Constructor
new Object3DNode( scope : 'position' | 'viewPosition' | 'direction' | 'scale' | 'worldMatrix', object3d : Object3D )
Constructs a new object 3D node.
| scope |
The node represents a different type of transformation depending on the scope. |
| object3d |
The 3D object. Default is |
Properties
.scope : 'position' | 'viewPosition' | 'direction' | 'scale' | 'worldMatrix'
The node reports a different type of transformation depending on the scope.
.uniformNode : UniformNode
Holds the value of the node as a uniform.
.updateType : string
Overwritten since this type of node is updated per object.
Default is 'object'.
- Overrides: Node#updateType
Methods
.generate( builder : NodeBuilder ) : string
Generates the code snippet of the uniform node. The node type of the uniform node also depends on the selected scope.
| builder |
The current node builder. |
- Overrides: Node#generate
- Returns: The generated code snippet.
.getNodeType() : 'mat4' | 'vec3' | 'float'
Overwritten since the node type is inferred from the scope.
- Overrides: Node#getNodeType
- Returns: The node type.
.update( frame : NodeFrame )
Updates the uniform value depending on the scope.
| frame |
The current node frame. |
- Overrides: Node#update