N E W

OverrideContextNode

Last modified: Jun 14, 2026

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 ) ) );
export {}

Constructor

new OverrideContextNode(overrideNodes, flowNode?)
ParameterTypeDefault Value
overrideNodesMap<Node, Function>
flowNode?null | Nodenull

Constructs a new override context node.

AccessorType

Properties

PropertyTypeDefault Value
isOverrideContextNodeboolean
MethodType

Extends

ContextNode
N E W

overrideNode

TSL function for creating an OverrideContextNode to override a single target node.

material.contextNode = overrideNode( positionLocal, ( builder ) => positionLocal.add( vec3( 1, 0, 0 ) ) );
export {}
ParameterTypeDefault Value
targetNodeNode
callback?null | Function | Nodenull
flowNode?null | Nodenull

Returns

OverrideContextNode
N E W

overrideNodes

TSL function for creating an OverrideContextNode to override multiple target nodes.

material.contextNode = overrideNodes( [
	[ positionView, customPositionView ],
	[ positionViewDirection, ( builder ) => customPositionViewDirection ]
] );
export {}
ParameterTypeDefault Value
overridesMap<Node, Function | Node> | Array<Array<Function | Node>>
flowNode?null | Nodenull

Returns

OverrideContextNode