Documentation
    Preparing search index...

    Function registerSceneNodeTypes

    • Everything a §79 round trip of an engine-authored scene needs: the component serializers, the node-type writer, and the node factory (A-14, PH-17).

      The one call an application makes: the §73 widgets (registerUISerializers) and the drawing tier (registerRenderSerializers), chained by composeSceneNodeTypes. Chaining an application's own classes on top is the same call:

      const io = registerSceneNodeTypes({ atlas, geometries, materials });
      const document = serializeScene(
      root,
      io.components,
      composeSceneNodeTypes(myOwnPair, io).write,
      );

      restoreNodeId is not needed by any of the widgets: each takes its id through UIWidgetOptions (which extends NodeOptions), so a restored widget is constructed with the id it was saved under (A-17). The drawing-tier classes do not take an id — a Renderable is constructed from its geometry and material — so those restore through the restoreNodeId path instantiateScene already applies to any factory-built node whose id differs from the document's.

      Parameters

      • options: SceneNodeTypeOptions = {}

        the glyph atlas restored labels are given, and the §79 resource catalogs the drawables resolve through

      Returns SceneSerializationSupport

      a fresh registry and the matching writer/reader halves