InstanceNode

Last modified: Jun 30, 2024

This node implements the vertex shader logic which is required when rendering 3D objects via instancing. The code makes sure vertex positions, normals and colors can be modified via instanced data.

Constructor

new InstanceNode(count, instanceMatrix, instanceColor?)
ParameterTypeDefault Value
countnumber
instanceMatrixany
instanceColor?anynull

Constructs a new instance node.

AccessorType

Properties

PropertyTypeDefault Value
countnumber
instanceMatrixInstancedBufferAttribute
instanceColorInstancedBufferAttribute
instanceMatrixNodenull | Node
instanceColorNodenull | Node
buffernull | InstancedInterleavedBuffer
bufferColornull | InstancedBufferAttribute
previousInstanceMatrixNodenull | Node
MethodType

Extends

Node

instance

TSL function for creating an instance node.

ParameterTypeDefault Value
countnumber
instanceMatrixany
instanceColorany

Returns

InstanceNode