File: InstanceNode.md | Updated: 11/15/2025
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.
Constructs a new instance node.
count | The number of instances.
---|---
instanceMatrix | Instanced buffer attribute representing the instance transformations.
instanceColor | Instanced buffer attribute representing the instance colors. Default is null.
A reference to a buffer that is used by instanceMatrixNode.
A reference to a buffer that is used by instanceColorNode.
The number of instances.
Instanced buffer attribute representing the color of instances.
The node that represents the instance color data.
Default is null.
Instanced buffer attribute representing the transformation of instances.
The node that represents the instance matrix data.
The update type is set to frame since an update of instanced buffer data must be checked per frame.
Default is 'frame'.
Overrides: Node#updateType
Setups the internal buffers and nodes and assigns the transformed vertex data to predefined node variables for accumulation. That follows the same patterns like with morph and skinning nodes.
builder | The current node builder.
---|---
Overrides: Node#setup
Checks if the internal buffers required an update.
frame | The current node frame.
---|---
Overrides: Node#update