Inheritance: EventDispatcher → Node → ReferenceNode →
This node is a special type of reference node which is intended for linking material properties with node values.
When changing material.opacity, the node value of opacityNode will automatically be updated.
const opacityNode = materialReference( 'opacity', 'float', material );
Constructs a new material reference node.
property
The name of the property the node refers to.
inputType
The uniform type that should be used to represent the property value.
material
The material the property belongs to. When no material is set, the node refers to the material of the current rendered object.
Default is null.
This flag can be used for type testing.
Default is true.
The material the property belongs to. When no material is set, the node refers to the material of the current rendered object.
Default is null.
Updates the reference based on the given state. The state is only evaluated MaterialReferenceNode#material is not set.
state
The current state.
Overrides: ReferenceNode#updateReference
Returns: The updated reference.