export function buildSkinningPalette(skeleton, maxJoints = 256) {
    const palette = skeleton.matrixPalette();
    if (palette.length > maxJoints) {
        throw new Error(`Skeleton has ${palette.length} joints, exceeding max ${maxJoints}.`);
    }
    const matrices = new Float32Array(palette.length * 16);
    for (let index = 0; index < palette.length; index += 1) {
        matrices.set(palette[index], index * 16);
    }
    return { jointCount: palette.length, matrices };
}
//# sourceMappingURL=Skinning.js.map