skinned-glb

A skinned, morphing mesh out as a GLB. writeSkinnedGlb writes one skeleton, any number of meshes skinned to it (four influences a vertex), each with morph targets named in extras.targetNames, and plain glTF metallic-roughness materials with their images embedded. Pure: no Babylon, no DOM, synchronous, bytes out. It is writeGarmentGlb's sibling for rigged bodies, which that writer does not do (no skin, no morphs).

Part of the character core: import it as tosijs-3d/skinned-glb. Written for Dramatis's character exporter (GLB and VRM), and checked against the Khronos validator and Babylon's own loader.

import { writeSkinnedGlb } from 'tosijs-3d/skinned-glb'
const bytes = writeSkinnedGlb({ asset, joints, skinName, skeletonRoot, inverseBindMatrices, meshes, materials, images })

What it guarantees, so the Khronos validator is clean: