ContextNode

Last modified: Nov 27, 2025

This node can be used as a context management component for another node. {@link NodeBuilder} performs its node building process in a specific context and this node allows the modify the context. A typical use case is to overwrite getUV() e.g.:

node.context( { getUV: () => customCoord } ); \// or material.contextNode = context( { getUV: () => customCoord } ); \// or renderer.contextNode = context( { getUV: () => customCoord } ); \// or scenePass.contextNode = context( { getUV: () => customCoord } );

Constructor

new ContextNode(node?, value?)
ParameterTypeDefault Value
node?Nodenull
value?Object{}

Constructs a new context node.

AccessorTypeModifiers
get typestringstatic
MethodTypeModifiers

Extends

Node

context

ParameterTypeDefault Value
nodeOrValue?Object | Nodenull
value?Object{}

Returns

ContextNode

uniformFlow

ParameterTypeDefault Value
nodeNode

Returns

ContextNode

setName

ParameterTypeDefault Value
nodeNode
namestring

Returns

ContextNode

builtinShadowContext

TSL function for defining a built-in shadow context for a given node.

ParameterTypeDefault Value
shadowNodeShadowNode
lightLight
node?Nodenull

Returns

ContextNode

builtinAOContext

TSL function for defining a built-in ambient occlusion context for a given node.

ParameterTypeDefault Value
aoNodeNode
node?Nodenull

Returns

ContextNode

label

TSL function for defining a label context value for a given node.

ParameterTypeDefault Value
nodeNode
namestring

Returns

ContextNode