VarNode

Last modified: Jun 30, 2024

Class for representing shader variables as nodes. Variables are created from existing nodes like the following:

const depth = sampleDepth( uvNode ).toVar( 'depth' );
export {}

Constructor

new VarNode(node, name?, readOnly?)
ParameterTypeDefault Value
nodeNode
name?null | stringnull
readOnly?booleanfalse

Constructs a new variable node.

AccessorType

Properties

PropertyTypeDefault Value
nodeNode
isVarNodeboolean
readOnlyboolean
intentboolean
MethodType

Extends

Node

Var

TSL function for creating a var node.

ParameterTypeDefault Value
nodeNode
name?null | stringnull

Returns

VarNode

Const

TSL function for creating a const node.

ParameterTypeDefault Value
nodeNode
name?null | stringnull

Returns

VarNode

VarIntent

TSL function for creating a var intent node.

Properties

Node

Returns

VarNode