Skip to main content

Module write

Module write 

Source
Expand description

Minimal glTF 2.0 writer for convert/transform: emits the skeleton (node hierarchy + rest TRS), each clip’s writable animation tracks, and whatever scene assets the Document carries (Document::assets — triangulated meshes, skins, factor-only materials, and embedded base-color textures). A document with default-empty assets writes animation + skeleton only, so animation data can still enter glTF-based tooling (including animsmith itself) straight from a DCC export.

Values are written exactly as held in the core model — lint first; conversion does not repair.

Structs§

WriteSummary
Counts of the scene data emitted by write().

Functions§

write
Serialize doc to path (.glb for binary, anything else as .gltf JSON with an embedded data-URI buffer): skeleton, animation, and any scene assets it carries (Document::assets — triangulated meshes, skins, factor-only materials, and embedded PNG/JPEG base-color textures). A Document with default-empty assets writes animation and skeleton only.