UserDataNode

Last modified: Jun 30, 2024

A special type of reference node that allows to link values in userData fields to node objects.

sprite.userData.rotation = 1; // stores individual rotation per sprite

const material = new THREE.SpriteNodeMaterial();
material.rotationNode = userData( 'rotation', 'float' );
export {}

Since UserDataNode is extended from ReferenceNode, the node value will automatically be updated when the rotation user data field changes.

Constructor

new UserDataNode(property, inputType, userData?)
ParameterTypeDefault Value
propertystring
inputTypestring
userData?null | Objectnull

Constructs a new user data node.

AccessorType

Properties

PropertyTypeDefault Value
userDatanull | Object
MethodType

Extends

ReferenceNode

userData

TSL function for creating a user data node.

ParameterTypeDefault Value
namestring
inputTypestring
userDatanull | Object

Returns

UserDataNode