Node

@Serializable
data class Node(var name: String? = null, val camera: Int = -1, val skin: Int = -1, val mesh: Int? = null, val children: IntArray = intArrayOf(), val scale: FloatArray? = null, val translation: FloatArray? = null, val rotation: FloatArray? = null, val matrix: FloatArray? = null, val weights: IntArray? = null, val extensions: JsonElement? = null, val extras: JsonElement? = null) : GLTFProperty

Constructors

Link copied to clipboard
constructor(name: String? = null, camera: Int = -1, skin: Int = -1, mesh: Int? = null, children: IntArray = intArrayOf(), scale: FloatArray? = null, translation: FloatArray? = null, rotation: FloatArray? = null, matrix: FloatArray? = null, weights: IntArray? = null, extensions: JsonElement? = null, extras: JsonElement? = null)

Properties

Link copied to clipboard
val camera: Int

The index of the camera referenced by this node.

Link copied to clipboard

The indices of this node's children.

Link copied to clipboard
open override val extensions: JsonElement? = null

JSON object with extension-specific objects.

Link copied to clipboard
open override val extras: JsonElement? = null

Although extras MAY have any type, it is common for applications to store and access custom data as key/value pairs. Therefore, extras SHOULD be a JSON object rather than a primitive value for best portability.

Link copied to clipboard
val matrix: FloatArray? = null

A floating-point 4x4 transformation matrix stored in column-major order.

Link copied to clipboard
val mesh: Int? = null

The index of the mesh in this node.

Link copied to clipboard
val mmatrix: Matrix4
Link copied to clipboard
open override var name: String?
Link copied to clipboard
val rotation: FloatArray? = null

The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.

Link copied to clipboard
val scale: FloatArray? = null

The node's non-uniform scale, given as the scaling factors along the x, y, and z axes.

Link copied to clipboard
val skin: Int

The index of the skin referenced by this node. When a skin is referenced by a node within a scene, all joints used by the skin MUST belong to the same scene. When defined, mesh MUST also be defined.

Link copied to clipboard
val translation: FloatArray? = null

The node's translation along the x, y, and z axes.

Link copied to clipboard
val weights: IntArray? = null

The weights of the instantiated morph target. The number of array elements MUST match the number of morph targets of the referenced mesh. When defined, mesh MUST also be defined.

Functions

Link copied to clipboard
Link copied to clipboard