Capítulo 377 de 859
ArrayNode represents a collection of nodes, typically created using the array function.
const colors = array( [
vec3( 1, 0, 0 ),
vec3( 0, 1, 0 ),
vec3( 0, 0, 1 )
] );
const redColor = tintColors.element( 0 );
Constructor
| Signature |
|---|
new ArrayNode( nodeType : string, count : number, values : Array.<Node> ) |
Properties
| Property | Description |
|---|---|
.count : number | Array size. |
.isArrayNode : boolean (readonly) | This flag can be used for type testing. |
.values : Array.<Node> | Array default values. |
Methods
| Method | Description |
|---|---|
.generate( builder : NodeBuilder ) : string | This method builds the output node and returns the resulting array as a shader string. |
.generateNodeType( builder : NodeBuilder ) : string | Returns the node's type. |
.getArrayCount( builder : NodeBuilder ) : number | Returns the number of elements in the node array. |
.getElementType( builder : NodeBuilder ) : string | Returns the node's type. |
.getMemberType( builder : NodeBuilder, name : string ) : string | Returns the type of a member variable. |