Inheritance: EventDispatcher → Node → ContextNode →
A specialized context node designed to override specific target nodes within a node sub-graph or flow. This allows replacing specific inputs (e.g., normal and position vectors) dynamically during compilation for a specific flow node, without having to reconstruct or duplicate the source nodes.
// Method chaining example:
node.overrideNode( positionLocal, () => positionLocal.add( vec3( 1, 0, 0 ) ) );
// Context assignment example:
material.contextNode = overrideNode( positionLocal, () => positionLocal.add( vec3( 1, 0, 0 ) ) );
Constructs a new override context node.
overrideNodes
A map mapping target nodes to their respective override callback functions.
flowNode
The node whose context should be modified.
Default is null.
This flag can be used for type testing.
Default is true.
Returns the type of the node.
Gathers the context data from all parent context nodes by traversing the hierarchy, merging the overrideNodes maps from all encountered OverrideContextNode instances.
Overrides: ContextNode#getFlowContextData
Returns: The gathered context data, containing the merged overrideNodes map.