Parent joint per joint (-1 for roots); also defines jointCount.
Inverse-bind matrices, jointCount × 16 column-major.
Rest-pose translations, jointCount × 3.
Rest-pose rotations (xyzw), jointCount × 4.
Rest-pose scales, jointCount × 3.
OptionalrootTransform: Float32Array<ArrayBufferLike>Optional ancestor transform above the root joint; defaults to identity.
OptionaljointNames: readonly (string | undefined)[]Optional per-joint names (from the source glTF nodes) enabling jointIndex lookup.
ReadonlyjointReadonlyparentParent joint index per joint, or -1 for roots.
ReadonlyinvInverse-bind matrices, jointCount × 16 column-major.
ReadonlyrootAccumulated ancestor transform above the skeleton root joint (16 floats, column-major).
ReadonlyrestRest-pose translations from GLTF node defaults (jointCount × 3).
ReadonlyrestRest-pose rotations from GLTF node defaults (jointCount × 4, xyzw).
ReadonlyrestRest-pose scales from GLTF node defaults (jointCount × 3).
Optional ReadonlyjointJoint names from the source glTF nodes (jointCount), undefined per joint when the node was unnamed.
Resolves a joint index by its source glTF node name, or -1 if unknown.
Requires jointNames (populated by the glTF loader). The first joint with a matching name wins. Used to attach a BoneAttachment (gun muzzle, weapon socket) to a named bone without hard-coding indices.
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).
Per-joint translations (jointCount × 3).
Per-joint rotations as xyzw quaternions (jointCount × 4).
Per-joint scales (jointCount × 3).
Destination buffer for the final joint matrices (jointCount × 16, column-major).
OptionaloutGlobal: Float32Array<ArrayBufferLike>Optional destination for the per-joint global (model-space) matrices (before multiplying by the inverse-bind). These are the bone poses a BoneAttachment reads to follow a joint (gun muzzle, weapon socket).
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.