Taos API Reference
    Preparing search index...

    Class Skeleton

    GLTF-style joint hierarchy with rest pose and inverse-bind matrices.

    Joints are stored as a flat array; parentIndices encodes the hierarchy (-1 = root). The skeleton itself is static — animation state lives in TRS arrays passed into Skeleton.computeJointMatrices, which produces the final joint matrices used for skinning. The skin layout matches the source GLTF: parents always appear before their children.

    Index

    Constructors

    Properties

    jointCount: number
    parentIndices: Int16Array

    Parent joint index per joint, or -1 for roots.

    invBindMats: Float32Array

    Inverse-bind matrices, jointCount × 16 column-major.

    rootTransform: Float32Array

    Accumulated ancestor transform above the skeleton root joint (16 floats, column-major).

    restTranslations: Float32Array

    Rest-pose translations from GLTF node defaults (jointCount × 3).

    restRotations: Float32Array

    Rest-pose rotations from GLTF node defaults (jointCount × 4, xyzw).

    restScales: Float32Array

    Rest-pose scales from GLTF node defaults (jointCount × 3).

    Methods

    • Computes final skinning matrices (global × invBind per joint) from per-joint TRS arrays.

      Parents must appear before children in the joint list (guaranteed by GLTF).

      Parameters

      • translations: Float32Array

        Per-joint translations (jointCount × 3).

      • rotations: Float32Array

        Per-joint rotations as xyzw quaternions (jointCount × 4).

      • scales: Float32Array

        Per-joint scales (jointCount × 3).

      • out: Float32Array

        Destination buffer for the final joint matrices (jointCount × 16, column-major).

      Returns void