File: SplitNode.md | Updated: 11/15/2025
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;
Constructs a new split node.
node | The node that should be accessed.
---|---
components | The components that should be accessed. Default is 'x'.
The components that should be accessed.
This flag can be used for type testing.
Default is true.
The node that should be accessed.
Returns the component type of the node's type.
builder | The current node builder.
---|---
Returns: The component type.
This method is overwritten since the node type is inferred from requested components.
builder | The current node builder.
---|---
Overrides: Node#getNodeType
Returns: The node type.
Returns the scope of the node.
Overrides: Node#getScope
Returns: The scope of the node.
Returns the vector length which is computed based on the requested components.
Returns: The vector length.