Capítulo 506 de 859
A special type of reference node that allows to link values in userData fields to node objects.
Since UserDataNode is extended from ReferenceNode, the node value will automatically be updated when the rotation user data field changes.
userData object. If not provided, the userData property of the 3D object that uses the node material is evaluated.sprite.userData.rotation = 1; // stores individual rotation per sprite
const material = new THREE.SpriteNodeMaterial();
material.rotationNode = userData( 'rotation', 'float' );
Constructor
| Signature |
|---|
new UserDataNode( property : string, inputType : string, userData : Object ) |
Properties
| Property | Description |
|---|---|
.userData : Object | A reference to the userData object. If not provided, the userData property of the 3D object that uses the node material is evaluated. |
Methods
| Method | Description |
|---|---|
| `.updateReference( state : NodeFrame | NodeBuilder ) : Object` |