Serializes every child of root (not root itself -- it plays the same role as
GltfLoader's synthetic "glTF_Root", a local container rather than scene content).
Serializes obj itself (and its subtree) as the document's sole top-level node -- unlike
write(), which serializes root's children. Used for prefab export: obj stays exactly
where it is in the live scene graph (never reparented, unlike Object3D.add()'s silent
detach), so exporting a prefab from a selected object can't disturb the scene being edited.
Serializes a live
Object3Dtree into a minimal glTF 2.0 JSON document -- the write-side counterpart toGltfLoader. See docs/adr/0010-maker-editor-architecture.md for why glTF + anSW_*extension namespace, rather than a bespoke format, and ADR 0017 for how individual extensions (light, prefab, stage zone, ...) plug into this writer via a registry instead of being hardcoded here.Phase 0 scope only:
pbrMetallicRoughness-- noSW_*extension needed yet sinceStandardMaterial's fields map onto it directly.POSITIONonly (no normals/uvs/indices) -- enough to prove the round-trip mechanism end to end; richer attribute export is a later phase once Maker actually needs textured/lit preview meshes.