UniformArrayNode

Last modified: Jul 26, 2024

Similar to BufferNode this module represents array-like data as uniform buffers. Unlike BufferNode, it can handle more common data types in the array (e.g three.js primitives) and automatically manage buffer padding. It should be the first choice when working with uniforms buffers.

const tintColors = uniformArray( [
	new Color( 1, 0, 0 ),
	new Color( 0, 1, 0 ),
	new Color( 0, 0, 1 )
], 'color' );

const redColor = tintColors.element( 0 );
export {}

Constructor

new UniformArrayNode(value, elementType?)
ParameterTypeDefault Value
valueArray<any>
elementType?null | stringnull

Constructs a new uniform array node.

AccessorType

Properties

PropertyTypeDefault Value
arrayArray<any>
elementTypestring
paddedTypestring
isArrayBufferNodeboolean
MethodType

Extends

BufferNode

uniformArray

TSL function for creating an uniform array node.

ParameterTypeDefault Value
valuesArray<any>
nodeType?null | string

Returns

UniformArrayNode