@fourjs/serialization — the §79 scene document and its §80 migrations.
Three modules: format.ts is the document (types, canonical validation, JSON
text), serializer.ts turns a live scene graph into one and back through a
per-type component-serializer registry, and migration.ts upgrades older
documents.
That sample is enough for a Scene of Groups. A graph that holds a
Renderable, Text, camera, or light needs registerSceneNodeTypes() from
the umbrella — this package cannot name those classes (§3.1). Without that
pair, serializeScene throws rather than dropping the node.
@fourjs/serialization— the §79 scene document and its §80 migrations.Three modules:
format.tsis the document (types, canonical validation, JSON text),serializer.tsturns a live scene graph into one and back through a per-type component-serializer registry, andmigration.tsupgrades older documents.That sample is enough for a
SceneofGroups. A graph that holds aRenderable,Text, camera, or light needsregisterSceneNodeTypes()from the umbrella — this package cannot name those classes (§3.1). Without that pair,serializeScenethrows rather than dropping the node.