MaterialReferenceNode

Last modified: Jun 30, 2024

This node is a special type of reference node which is intended for linking material properties with node values.

const opacityNode = materialReference( 'opacity', 'float', material );
export {}

When changing material.opacity, the node value of opacityNode will automatically be updated.

Constructor

new MaterialReferenceNode(property, inputType, material?)
ParameterTypeDefault Value
propertystring
inputTypestring
material?anynull

Constructs a new material reference node.

AccessorType

Properties

PropertyTypeDefault Value
materialany
isMaterialReferenceNodeboolean
MethodType

Extends

ReferenceNode

materialReference

TSL function for creating a material reference node.

ParameterTypeDefault Value
namestring
typestring
material?anynull

Returns

MaterialReferenceNode