Inheritance: EventDispatcher → Node →
Base class for representing data input nodes.
Constructs a new input node.
value
The value of this node. This can be any JS primitive, functions, array buffers or even three.js objects (vector, matrices, colors).
nodeType
The node type. If no explicit type is defined, the node tries to derive the type from its value.
Default is null.
This flag can be used for type testing.
Default is true.
The precision of the value in the shader.
Default is null.
The value of this node. This can be any JS primitive, functions, array buffers or even three.js objects (vector, matrices, colors).
Returns the input type of the node which is by default the node type. Derived modules might overwrite this method and use a fixed type or compute one analytically.
A typical example for different input and node types are textures. The input type of a normal RGBA texture is texture whereas its node type is vec4.
builder
The current node builder.
Returns: The input type.
Sets the precision to the given value. The method can be overwritten in derived classes if the final precision must be computed analytically.
precision
The precision of the input value in the shader.
Returns: A reference to this node.