Capítulo 477 de 859
This module is part of the TSL core and usually not used in app level code. SplitNode represents a property access operation which means it is used to implement any .xyzw, .rgba and stpq usage on node objects. For example:
const redValue = color.r;
Constructor
| Signature |
|---|
new SplitNode( node : Node, components : string ) |
Properties
| Property | Description |
|---|---|
.components : string | The components that should be accessed. |
.isSplitNode : boolean (readonly) | This flag can be used for type testing. |
.node : Node | The node that should be accessed. |
Methods
| Method | Description |
|---|---|
.generateNodeType( builder : NodeBuilder ) : string | This method is overwritten since the node type is inferred from requested components. |
.getComponentType( builder : NodeBuilder ) : string | Returns the component type of the node's type. |
.getScope() : Node | Returns the scope of the node. |
.getVectorLength() : number | Returns the vector length which is computed based on the requested components. |