@pixi/3d
    Preparing search index...

    Interface SkeletonOptions

    Constructor options for Skeleton

    A Model3D builds its skeletons from the file's skins, so you only need these to rig a mesh in code. Nodes are numbered from 0.

    const inverseBindMatrices = new Float32Array(32);

    inverseBindMatrices.set(new Matrix4().elements, 0);
    inverseBindMatrices.set(new Matrix4().makeTranslation(0, -1, 0).elements, 16);

    const options: SkeletonOptions = {
    parent: new Int16Array([-1, 0]),
    joints: new Int16Array([0, 1]),
    inverseBindMatrices,
    labels: ['base', 'tip'],
    };
    interface SkeletonOptions {
        bindShapeMatrix?: Float32Array<ArrayBufferLike>;
        inverseBindMatrices: Float32Array;
        joints: Int16Array;
        labels?: string[];
        parent: Int16Array;
    }
    Index
    bindShapeMatrix?: Float32Array<ArrayBufferLike>

    The transform the skinned mesh was bound at, as a column-major 4x4 matrix; the identity when left out

    Give the mesh the same transform: its bounds then measure the bind pose, and the bone matrices cancel it, so the skin still draws where the joints put it. It must be a position, rotation and scale with no shear. A Model3D works it out from the file.

    mesh.scale.set(100, 100, 100);
    mesh.updateLocalTransform();

    const skeleton = new Skeleton({
    parent,
    joints,
    inverseBindMatrices,
    bindShapeMatrix: mesh.localTransform.toArray(),
    });
    inverseBindMatrices: Float32Array

    One column-major 4x4 matrix per joint, in joints order, taking a vertex from the bind pose into the joint's space

    const inverseBindMatrices = new Float32Array(32);

    inverseBindMatrices.set(new Matrix4().elements, 0);
    inverseBindMatrices.set(new Matrix4().makeTranslation(0, -1, 0).elements, 16);
    joints: Int16Array

    The nodes that are joints, as node indices; its length is the joint count

    A skinned geometry's joints attribute indexes this list, not the nodes, as glTF's JOINTS_0 does. Nodes left out only carry the joints below them.

    const arm = new Skeleton({
    parent: new Int16Array([-1, 0, 1]),
    joints: new Int16Array([1, 2]),
    inverseBindMatrices,
    });
    labels?: string[]

    A label for each node, in node order, so indexOf can find it

    const tail = new Skeleton({ parent, joints, inverseBindMatrices, labels: ['base', 'tip'] });
    const tip = tail.indexOf('tip');
    parent: Int16Array

    Parent of each node, as a node index, or -1 for a root; its length is the node count

    A parent must come before its children.

    const chain = new Skeleton({ parent: new Int16Array([-1, 0, 1]), joints, inverseBindMatrices });