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?)| Parameter | Type | Default Value |
|---|---|---|
| property | string | — |
| inputType | string | — |
| userData? | null | Object | null |
Constructs a new user data node.
| Accessor | Type | |
|---|---|---|
| get type | string | |
Properties
| Property | Type | Default Value | |
|---|---|---|---|
| userData | null | Object | — | |
| Method | Type | |
|---|---|---|
| updateReference | (state: any) => Object | |
Extends
ReferenceNodeTSL function for creating a user data node.
| Parameter | Type | Default Value |
|---|---|---|
| name | string | — |
| inputType | string | — |
| userData | null | Object | — |
Returns
UserDataNode