ScenegraphNode is a base class for objects in the luma.gl scene graph, such as
Camera. It holds the transformation matrix (i.e. the position, orientation and scale) of the object.
ScenegraphNode is a base class, normally only instantiated via base classes.
const model = new Model(); model .setPosition([0, 1, 2]) .update();
A Model instance has a number of public properties that can be accessed/modified:
position(object) - A
Vector3indicating the position of the Model.
rotation(object) - A
Vector3indicating the rotation of the Model.
scale(object) - A
Vecto3indicating the scaling of the Model.
matrix(object) - A
Matrix4containing information about position, rotation and scale.
This matrix gets updated each time the method
update is called on a Model instance.
The model matrix of this scenegraph node.
var node = new Model(gl, props);
Number) - Sets the position part of the matrix
Number) - Sets the rotation part of the matrix
Number) - Sets the scale part of the matrix
Note that setting orientation props does not actually update the object's matrix.
update() must be called.
Update the model matrix. Useful to update changes to the