Documentation
    Preparing search index...

    Function migrateSceneDocument

    • Upgrades value to the current scene format and validates it (§79, §80).

      The one call a loader needs: it accepts a document of any version the registered chain can reach SCENE_FORMAT_VERSION from — including the current version, which passes straight through to validation — and returns a canonical SceneDocument ready for instantiateScene.

      Parameters

      • value: unknown

        the candidate document (typically JSON.parse output)

      • registry: SceneMigrationRegistry

        the registered upgrade steps

      • Optionaloptions: Omit<MigrateSceneDocumentOptions, "targetVersion">

        lossy-change reporting (targetVersion is ignored: the result has to be a document this build can validate)

      Returns SceneDocument

      the canonical, frozen document at SCENE_FORMAT_VERSION

      FourError / TypeError exactly as runSceneMigrations, then as validateSceneDocument