ReferenceNode

Last modified: Jun 30, 2024

This type of node establishes a reference to a property of another object. In this way, the value of the node is automatically linked to the value of referenced object. Reference nodes internally represent the linked value as a uniform.

Constructor

new ReferenceNode(property, uniformType, object?, count?)
ParameterTypeDefault Value
propertystring—
uniformTypestring—
object?null | Objectnull
count?null | numbernull

Constructs a new reference node.

AccessorType

Properties

PropertyTypeDefault Value
propertystring—
uniformTypestring—
objectnull | Object—
countnull | number—
propertiesArray<string>—
referencenull | Object—
nodeUniformNode—
groupUniformGroupNode—
MethodType

Extends

Node

reference

TSL function for creating a reference node.

ParameterTypeDefault Value
namestring—
typestring—
object?null | Object—

Returns

ReferenceNode

referenceBuffer

TSL function for creating a reference node. Use this function if you want need a reference to an array-like property that should be represented as a uniform buffer.

ParameterTypeDefault Value
namestring—
typestring—
countnumber—
objectObject—

Returns

ReferenceNode