ModelNode

external class ModelNode(source)
Use [Model.getNode] to get a node from a loaded model. Do not call the constructor directly.

A model node with a modifiable transform to allow users to define their own animations. While a model's asset can contain animations that target a node's transform, this class allows users to change a node's transform externally. In this way, animation can be driven by another source, not just by the model's asset.

const node = model.getNode("Hand");
node.matrix = Matrix4.fromScale(new Cartesian3(5.0, 1.0, 1.0), node.matrix);

See also

Properties

Link copied to clipboard
val id: Double

The index of the node in the glTF.

Link copied to clipboard

The node's 4x4 matrix transform from its local coordinates to its parent's. Setting the matrix to undefined will restore the node's original transform, and allow the node to be animated by any animations in the model again.

Link copied to clipboard

The value of the name property of this node.

Link copied to clipboard

Gets the node's original 4x4 matrix transform from its local coordinates to its parent's, without any node transformations or articulations applied.

Link copied to clipboard

Determines if this node and its children will be shown.