Inheritance: EventDispatcher → Node → InputNode → UniformNode →
A special type of uniform node which represents array-like data as uniform buffers. The access usually happens via element() which returns an instance of ArrayElementNode. For example:
In general, it is recommended to use the more managed UniformArrayNode since it handles more input types and automatically cares about buffer paddings.
const bufferNode = buffer( array, 'mat4', count );
const matrixNode = bufferNode.element( index ); // access a matrix from the buffer
Constructs a new buffer node.
value
Array-like buffer data.
bufferType
The data type of the buffer.
bufferCount
The count of buffer elements.
Default is 0.
The uniform node that holds the value of the reference node.
Default is 0.
The data type of the buffer.
This flag can be used for type testing.
Default is true.
An array of update ranges.
Adds a range of data in the data array to be updated on the GPU.
start
Position at which to start update.
count
The number of components to update.
Clears the update ranges.
The data type of the buffer elements.
builder
The current node builder.
Overrides: UniformNode#getElementType
Returns: The element type.
Overwrites the default implementation to return a fixed value 'buffer'.
builder
The current node builder.
Overrides: UniformNode#getInputType
Returns: The input type.