forked from mrdoob/three.js
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WebGPURenderer: Rename FatPoints to InstancedPoints (mrdoob#26965)
* Rename FatPoints to InstancedPoints * export class as default * cleanup * prevent circular import * Move to /objects/ * Move to /geometries/ * udpate example
- Loading branch information
Showing
9 changed files
with
64 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
examples/jsm/nodes/accessors/InstancedPointsMaterialNode.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import MaterialNode from './MaterialNode.js'; | ||
import { addNodeClass } from '../core/Node.js'; | ||
import { nodeImmutable } from '../shadernode/ShaderNode.js'; | ||
|
||
class InstancedPointsMaterialNode extends MaterialNode { | ||
|
||
setup( /*builder*/ ) { | ||
|
||
return this.getFloat( this.scope ); | ||
|
||
} | ||
|
||
} | ||
|
||
InstancedPointsMaterialNode.POINT_WIDTH = 'pointWidth'; | ||
|
||
export default InstancedPointsMaterialNode; | ||
|
||
export const materialPointWidth = nodeImmutable( InstancedPointsMaterialNode, InstancedPointsMaterialNode.POINT_WIDTH ); | ||
|
||
addNodeClass( 'FatPointsMaterialNode', InstancedPointsMaterialNode ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { | ||
Mesh | ||
} from 'three'; | ||
import InstancedPointsGeometry from '../geometries/InstancedPointsGeometry.js'; | ||
import InstancedPointsNodeMaterial from '../nodes/materials/InstancedPointsNodeMaterial.js'; | ||
|
||
class InstancedPoints extends Mesh { | ||
|
||
constructor( geometry = new InstancedPointsGeometry(), material = new InstancedPointsNodeMaterial() ) { | ||
|
||
super( geometry, material ); | ||
|
||
this.isInstancedPoints = true; | ||
|
||
this.type = 'InstancedPoints'; | ||
|
||
} | ||
|
||
} | ||
|
||
export default InstancedPoints; |
This file was deleted.
Oops, something went wrong.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters