ModelNode

Last modified: Jun 30, 2024

This type of node is a specialized version of Object3DNode with larger set of model related metrics. Unlike Object3DNode, ModelNode extracts the reference to the 3D object from the current node frame state.

Constructor

new ModelNode(scope)
ParameterTypeDefault Value
scope"position" | "viewPosition" | "direction" | "scale" | "worldMatrix"

Constructs a new object model node.

AccessorType
MethodType

Extends

Object3DNode

modelDirection

TSL object that represents the object’s direction in world space.

Type

ModelNode<vec3>

modelWorldMatrix

TSL object that represents the object’s world matrix.

Type

ModelNode<mat4>

modelPosition

TSL object that represents the object’s position in world space.

Type

ModelNode<vec3>

modelScale

TSL object that represents the object’s scale in world space.

Type

ModelNode<vec3>

modelViewPosition

TSL object that represents the object’s position in view/camera space.

Type

ModelNode<vec3>

modelRadius

TSL object that represents the object’s radius.

Type

ModelNode<float>

modelNormalMatrix

TSL object that represents the object’s normal matrix.

Type

UniformNode<mat3>

modelWorldMatrixInverse

TSL object that represents the object’s inverse world matrix.

Type

UniformNode<mat4>

modelViewMatrix

TSL object that represents the object’s model view matrix.

Type

Node<mat4>

mediumpModelViewMatrix

TSL object that represents the object’s model view in mediump precision.

Type

Node<mat4>

highpModelViewMatrix

TSL object that represents the object’s model view in highp precision which is achieved by computing the matrix in JS and not in the shader.

Type

Node<mat4>

highpModelNormalViewMatrix

TSL object that represents the object’s model normal view in highp precision which is achieved by computing the matrix in JS and not in the shader.

Type

Node<mat3>