@vgai/engine 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/schemas/engine-capabilities.json +4 -4
- package/schemas/vgai-game.schema.json +2 -2
- package/src/adapter/authoring.ts +42 -0
- package/src/adapter/index.ts +3 -0
- package/src/adapter/ingest/overlay-apply.ts +50 -6
- package/src/adapter/ingest/scene-capture.ts +51 -2
- package/src/adapter/vgai-scene-game-adapter.ts +24 -0
- package/src/manifest/schema.ts +7 -3
- package/src/runtime/create-runtime.ts +97 -0
- package/src/runtime/game.ts +11 -1
- package/src/scene/asset-ref-check.ts +1 -1
- package/src/scene/scene-loader.ts +2 -2
- package/src/scene/user-data.ts +18 -0
- package/src/world3d-react/behavior.tsx +19 -11
- package/src/world3d-react/r3f-adapter.tsx +8 -0
- package/dist/adapter/adapter-surface.d.ts +0 -30
- package/dist/adapter/adapter-surface.d.ts.map +0 -1
- package/dist/adapter/adapter-surface.js +0 -18
- package/dist/adapter/authoring.d.ts +0 -461
- package/dist/adapter/authoring.d.ts.map +0 -1
- package/dist/adapter/authoring.js +0 -22
- package/dist/adapter/colyseus-networking-adapter.d.ts +0 -43
- package/dist/adapter/colyseus-networking-adapter.d.ts.map +0 -1
- package/dist/adapter/colyseus-networking-adapter.js +0 -38
- package/dist/adapter/first-party-systems.d.ts +0 -38
- package/dist/adapter/first-party-systems.d.ts.map +0 -1
- package/dist/adapter/first-party-systems.js +0 -77
- package/dist/adapter/game-adapter.d.ts +0 -133
- package/dist/adapter/game-adapter.d.ts.map +0 -1
- package/dist/adapter/game-adapter.js +0 -10
- package/dist/adapter/host-context.d.ts +0 -71
- package/dist/adapter/host-context.d.ts.map +0 -1
- package/dist/adapter/host-context.js +0 -16
- package/dist/adapter/index.d.ts +0 -22
- package/dist/adapter/index.d.ts.map +0 -1
- package/dist/adapter/index.js +0 -15
- package/dist/adapter/ingest/game-contract.d.ts +0 -53
- package/dist/adapter/ingest/game-contract.d.ts.map +0 -1
- package/dist/adapter/ingest/game-contract.js +0 -30
- package/dist/adapter/ingest/overlay-applier.d.ts +0 -118
- package/dist/adapter/ingest/overlay-applier.d.ts.map +0 -1
- package/dist/adapter/ingest/overlay-applier.js +0 -132
- package/dist/adapter/ingest/overlay-apply.d.ts +0 -60
- package/dist/adapter/ingest/overlay-apply.d.ts.map +0 -1
- package/dist/adapter/ingest/overlay-apply.js +0 -101
- package/dist/adapter/ingest/overlay-file.d.ts +0 -79
- package/dist/adapter/ingest/overlay-file.d.ts.map +0 -1
- package/dist/adapter/ingest/overlay-file.js +0 -66
- package/dist/adapter/ingest/overlay-report.d.ts +0 -113
- package/dist/adapter/ingest/overlay-report.d.ts.map +0 -1
- package/dist/adapter/ingest/overlay-report.js +0 -103
- package/dist/adapter/ingest/scene-capture.d.ts +0 -97
- package/dist/adapter/ingest/scene-capture.d.ts.map +0 -1
- package/dist/adapter/ingest/scene-capture.js +0 -248
- package/dist/adapter/ingest/upstream-pin.d.ts +0 -47
- package/dist/adapter/ingest/upstream-pin.d.ts.map +0 -1
- package/dist/adapter/ingest/upstream-pin.js +0 -50
- package/dist/adapter/loop-gate-report.d.ts +0 -34
- package/dist/adapter/loop-gate-report.d.ts.map +0 -1
- package/dist/adapter/loop-gate-report.js +0 -37
- package/dist/adapter/rapier-physics-adapter.d.ts +0 -12
- package/dist/adapter/rapier-physics-adapter.d.ts.map +0 -1
- package/dist/adapter/rapier-physics-adapter.js +0 -46
- package/dist/adapter/system-adapter.d.ts +0 -206
- package/dist/adapter/system-adapter.d.ts.map +0 -1
- package/dist/adapter/system-adapter.js +0 -13
- package/dist/adapter/transform.d.ts +0 -18
- package/dist/adapter/transform.d.ts.map +0 -1
- package/dist/adapter/transform.js +0 -1
- package/dist/adapter/vgai-scene-game-adapter.d.ts +0 -108
- package/dist/adapter/vgai-scene-game-adapter.d.ts.map +0 -1
- package/dist/adapter/vgai-scene-game-adapter.js +0 -762
- package/dist/ai/navigation.d.ts +0 -64
- package/dist/ai/navigation.d.ts.map +0 -1
- package/dist/ai/navigation.js +0 -133
- package/dist/animation/anim-graph-types.d.ts +0 -25
- package/dist/animation/anim-graph-types.d.ts.map +0 -1
- package/dist/animation/anim-graph-types.js +0 -1
- package/dist/animation/animation-clock.d.ts +0 -213
- package/dist/animation/animation-clock.d.ts.map +0 -1
- package/dist/animation/animation-clock.js +0 -301
- package/dist/animation/blend-node.d.ts +0 -22
- package/dist/animation/blend-node.d.ts.map +0 -1
- package/dist/animation/blend-node.js +0 -97
- package/dist/animation/camera-ownership.d.ts +0 -250
- package/dist/animation/camera-ownership.d.ts.map +0 -1
- package/dist/animation/camera-ownership.js +0 -169
- package/dist/animation/cinematic-cues.d.ts +0 -200
- package/dist/animation/cinematic-cues.d.ts.map +0 -1
- package/dist/animation/cinematic-cues.js +0 -213
- package/dist/animation/clip-map.d.ts +0 -12
- package/dist/animation/clip-map.d.ts.map +0 -1
- package/dist/animation/clip-map.js +0 -37
- package/dist/animation/gsap-registration.d.ts +0 -119
- package/dist/animation/gsap-registration.d.ts.map +0 -1
- package/dist/animation/gsap-registration.js +0 -92
- package/dist/animation/theatre-clock-binding.d.ts +0 -89
- package/dist/animation/theatre-clock-binding.d.ts.map +0 -1
- package/dist/animation/theatre-clock-binding.js +0 -29
- package/dist/animation/theatre-director.d.ts +0 -242
- package/dist/animation/theatre-director.d.ts.map +0 -1
- package/dist/animation/theatre-director.js +0 -235
- package/dist/animation/theatre-object-binding.d.ts +0 -305
- package/dist/animation/theatre-object-binding.d.ts.map +0 -1
- package/dist/animation/theatre-object-binding.js +0 -351
- package/dist/animation/xstate-animation-binding.d.ts +0 -56
- package/dist/animation/xstate-animation-binding.d.ts.map +0 -1
- package/dist/animation/xstate-animation-binding.js +0 -331
- package/dist/animation/xstate-animation-meta.d.ts +0 -266
- package/dist/animation/xstate-animation-meta.d.ts.map +0 -1
- package/dist/animation/xstate-animation-meta.js +0 -252
- package/dist/assets.d.ts +0 -26
- package/dist/assets.d.ts.map +0 -1
- package/dist/assets.js +0 -55
- package/dist/audio/index.d.ts +0 -4
- package/dist/audio/index.d.ts.map +0 -1
- package/dist/audio/index.js +0 -24
- package/dist/audio/tone-clock-binding.d.ts +0 -75
- package/dist/audio/tone-clock-binding.d.ts.map +0 -1
- package/dist/audio/tone-clock-binding.js +0 -29
- package/dist/audio/tone-context.d.ts +0 -114
- package/dist/audio/tone-context.d.ts.map +0 -1
- package/dist/audio/tone-context.js +0 -39
- package/dist/audio/tone-offline-render.d.ts +0 -90
- package/dist/audio/tone-offline-render.d.ts.map +0 -1
- package/dist/audio/tone-offline-render.js +0 -56
- package/dist/audio/wav-encode.d.ts +0 -38
- package/dist/audio/wav-encode.d.ts.map +0 -1
- package/dist/audio/wav-encode.js +0 -97
- package/dist/character/cloth-sim.d.ts +0 -179
- package/dist/character/cloth-sim.d.ts.map +0 -1
- package/dist/character/cloth-sim.js +0 -334
- package/dist/character/spring-chain.d.ts +0 -135
- package/dist/character/spring-chain.d.ts.map +0 -1
- package/dist/character/spring-chain.js +0 -165
- package/dist/core/game-loop.d.ts +0 -42
- package/dist/core/game-loop.d.ts.map +0 -1
- package/dist/core/game-loop.js +0 -167
- package/dist/core/seeded-random.d.ts +0 -69
- package/dist/core/seeded-random.d.ts.map +0 -1
- package/dist/core/seeded-random.js +0 -121
- package/dist/core/system-runner.d.ts +0 -120
- package/dist/core/system-runner.d.ts.map +0 -1
- package/dist/core/system-runner.js +0 -297
- package/dist/core/types.d.ts +0 -92
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js +0 -25
- package/dist/data/data-asset.d.ts +0 -101
- package/dist/data/data-asset.d.ts.map +0 -1
- package/dist/data/data-asset.js +0 -122
- package/dist/data/data-check-core.d.ts +0 -110
- package/dist/data/data-check-core.d.ts.map +0 -1
- package/dist/data/data-check-core.js +0 -178
- package/dist/data/data-ref.d.ts +0 -79
- package/dist/data/data-ref.d.ts.map +0 -1
- package/dist/data/data-ref.js +0 -130
- package/dist/data/vite-plugin-data.d.ts +0 -79
- package/dist/data/vite-plugin-data.d.ts.map +0 -1
- package/dist/data/vite-plugin-data.js +0 -217
- package/dist/dev/console-bridge.d.ts +0 -22
- package/dist/dev/console-bridge.d.ts.map +0 -1
- package/dist/dev/console-bridge.js +0 -71
- package/dist/dev/debug-draw.d.ts +0 -24
- package/dist/dev/debug-draw.d.ts.map +0 -1
- package/dist/dev/debug-draw.js +0 -73
- package/dist/dev/logger.d.ts +0 -30
- package/dist/dev/logger.d.ts.map +0 -1
- package/dist/dev/logger.js +0 -90
- package/dist/dev/performance-profiler.d.ts +0 -60
- package/dist/dev/performance-profiler.d.ts.map +0 -1
- package/dist/dev/performance-profiler.js +0 -181
- package/dist/dev/webgl-gpu-timer.d.ts +0 -8
- package/dist/dev/webgl-gpu-timer.d.ts.map +0 -1
- package/dist/dev/webgl-gpu-timer.js +0 -52
- package/dist/ecs/component-manager.d.ts +0 -205
- package/dist/ecs/component-manager.d.ts.map +0 -1
- package/dist/ecs/component-manager.js +0 -706
- package/dist/ecs/game-component.d.ts +0 -146
- package/dist/ecs/game-component.d.ts.map +0 -1
- package/dist/ecs/game-component.js +0 -141
- package/dist/ecs/hmr-swap-report.d.ts +0 -53
- package/dist/ecs/hmr-swap-report.d.ts.map +0 -1
- package/dist/ecs/hmr-swap-report.js +0 -55
- package/dist/humanoid/bake.operation.d.ts +0 -119
- package/dist/humanoid/bake.operation.d.ts.map +0 -1
- package/dist/humanoid/bake.operation.js +0 -228
- package/dist/humanoid/body.d.ts +0 -101
- package/dist/humanoid/body.d.ts.map +0 -1
- package/dist/humanoid/body.js +0 -530
- package/dist/humanoid/clips.d.ts +0 -62
- package/dist/humanoid/clips.d.ts.map +0 -1
- package/dist/humanoid/clips.js +0 -121
- package/dist/humanoid/compose.d.ts +0 -75
- package/dist/humanoid/compose.d.ts.map +0 -1
- package/dist/humanoid/compose.js +0 -176
- package/dist/humanoid/generate.d.ts +0 -92
- package/dist/humanoid/generate.d.ts.map +0 -1
- package/dist/humanoid/generate.js +0 -124
- package/dist/humanoid/index.d.ts +0 -24
- package/dist/humanoid/index.d.ts.map +0 -1
- package/dist/humanoid/index.js +0 -18
- package/dist/humanoid/schema.d.ts +0 -35
- package/dist/humanoid/schema.d.ts.map +0 -1
- package/dist/humanoid/schema.js +0 -87
- package/dist/humanoid/skeleton.d.ts +0 -103
- package/dist/humanoid/skeleton.d.ts.map +0 -1
- package/dist/humanoid/skeleton.js +0 -289
- package/dist/index.d.ts +0 -37
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -30
- package/dist/input/input-manager.d.ts +0 -945
- package/dist/input/input-manager.d.ts.map +0 -1
- package/dist/input/input-manager.js +0 -2207
- package/dist/input/input-types.d.ts +0 -174
- package/dist/input/input-types.d.ts.map +0 -1
- package/dist/input/input-types.js +0 -1
- package/dist/input/prompt-labels.d.ts +0 -21
- package/dist/input/prompt-labels.d.ts.map +0 -1
- package/dist/input/prompt-labels.js +0 -121
- package/dist/input/rebind-controller.d.ts +0 -59
- package/dist/input/rebind-controller.d.ts.map +0 -1
- package/dist/input/rebind-controller.js +0 -85
- package/dist/input/schema.d.ts +0 -16
- package/dist/input/schema.d.ts.map +0 -1
- package/dist/input/schema.js +0 -228
- package/dist/loader.d.ts +0 -43
- package/dist/loader.d.ts.map +0 -1
- package/dist/loader.js +0 -59
- package/dist/manifest/index.d.ts +0 -5
- package/dist/manifest/index.d.ts.map +0 -1
- package/dist/manifest/index.js +0 -8
- package/dist/manifest/load-file.d.ts +0 -4
- package/dist/manifest/load-file.d.ts.map +0 -1
- package/dist/manifest/load-file.js +0 -14
- package/dist/manifest/load.d.ts +0 -144
- package/dist/manifest/load.d.ts.map +0 -1
- package/dist/manifest/load.js +0 -273
- package/dist/manifest/schema.d.ts +0 -230
- package/dist/manifest/schema.d.ts.map +0 -1
- package/dist/manifest/schema.js +0 -394
- package/dist/physics/collision-system.d.ts +0 -41
- package/dist/physics/collision-system.d.ts.map +0 -1
- package/dist/physics/collision-system.js +0 -64
- package/dist/physics/physics-registry.d.ts +0 -45
- package/dist/physics/physics-registry.d.ts.map +0 -1
- package/dist/physics/physics-registry.js +0 -65
- package/dist/physics/transform-writer.d.ts +0 -16
- package/dist/physics/transform-writer.d.ts.map +0 -1
- package/dist/physics/transform-writer.js +0 -38
- package/dist/physics/trigger-dispatch.d.ts +0 -24
- package/dist/physics/trigger-dispatch.d.ts.map +0 -1
- package/dist/physics/trigger-dispatch.js +0 -80
- package/dist/react/game-state.d.ts +0 -156
- package/dist/react/game-state.d.ts.map +0 -1
- package/dist/react/game-state.js +0 -222
- package/dist/react/root-adapter.d.ts +0 -11
- package/dist/react/root-adapter.d.ts.map +0 -1
- package/dist/react/root-adapter.js +0 -41
- package/dist/react/unmanaged-root-detector.d.ts +0 -12
- package/dist/react/unmanaged-root-detector.d.ts.map +0 -1
- package/dist/react/unmanaged-root-detector.js +0 -45
- package/dist/react/use-data.d.ts +0 -60
- package/dist/react/use-data.d.ts.map +0 -1
- package/dist/react/use-data.js +0 -101
- package/dist/react/use-selection.d.ts +0 -75
- package/dist/react/use-selection.d.ts.map +0 -1
- package/dist/react/use-selection.js +0 -90
- package/dist/render/auto-batcher.d.ts +0 -34
- package/dist/render/auto-batcher.d.ts.map +0 -1
- package/dist/render/auto-batcher.js +0 -140
- package/dist/render/render-batch-system.d.ts +0 -33
- package/dist/render/render-batch-system.d.ts.map +0 -1
- package/dist/render/render-batch-system.js +0 -230
- package/dist/render/render-features.d.ts +0 -47
- package/dist/render/render-features.d.ts.map +0 -1
- package/dist/render/render-features.js +0 -105
- package/dist/render/render-settings.d.ts +0 -36
- package/dist/render/render-settings.d.ts.map +0 -1
- package/dist/render/render-settings.js +0 -51
- package/dist/runtime/create-runtime.d.ts +0 -249
- package/dist/runtime/create-runtime.d.ts.map +0 -1
- package/dist/runtime/create-runtime.js +0 -641
- package/dist/runtime/debug-bridge.d.ts +0 -257
- package/dist/runtime/debug-bridge.d.ts.map +0 -1
- package/dist/runtime/debug-bridge.js +0 -224
- package/dist/runtime/debug-registry.d.ts +0 -288
- package/dist/runtime/debug-registry.d.ts.map +0 -1
- package/dist/runtime/debug-registry.js +0 -513
- package/dist/runtime/frame-selector-cache.d.ts +0 -41
- package/dist/runtime/frame-selector-cache.d.ts.map +0 -1
- package/dist/runtime/frame-selector-cache.js +0 -65
- package/dist/runtime/game.d.ts +0 -496
- package/dist/runtime/game.d.ts.map +0 -1
- package/dist/runtime/game.js +0 -741
- package/dist/runtime/gameplay-rng-trap.d.ts +0 -48
- package/dist/runtime/gameplay-rng-trap.d.ts.map +0 -1
- package/dist/runtime/gameplay-rng-trap.js +0 -96
- package/dist/runtime/input-router.d.ts +0 -78
- package/dist/runtime/input-router.d.ts.map +0 -1
- package/dist/runtime/input-router.js +0 -171
- package/dist/runtime/mount-game.d.ts +0 -129
- package/dist/runtime/mount-game.d.ts.map +0 -1
- package/dist/runtime/mount-game.js +0 -152
- package/dist/runtime/mount-manifest.d.ts +0 -173
- package/dist/runtime/mount-manifest.d.ts.map +0 -1
- package/dist/runtime/mount-manifest.js +0 -297
- package/dist/runtime/render-audio-control.d.ts +0 -110
- package/dist/runtime/render-audio-control.d.ts.map +0 -1
- package/dist/runtime/render-audio-control.js +0 -111
- package/dist/runtime/render-control.d.ts +0 -291
- package/dist/runtime/render-control.d.ts.map +0 -1
- package/dist/runtime/render-control.js +0 -264
- package/dist/runtime/render-seed.d.ts +0 -57
- package/dist/runtime/render-seed.d.ts.map +0 -1
- package/dist/runtime/render-seed.js +0 -74
- package/dist/runtime/state-bridge.d.ts +0 -61
- package/dist/runtime/state-bridge.d.ts.map +0 -1
- package/dist/runtime/state-bridge.js +0 -63
- package/dist/runtime/types.d.ts +0 -253
- package/dist/runtime/types.d.ts.map +0 -1
- package/dist/runtime/types.js +0 -1
- package/dist/scene/asset-loaders.d.ts +0 -79
- package/dist/scene/asset-loaders.d.ts.map +0 -1
- package/dist/scene/asset-loaders.js +0 -141
- package/dist/scene/asset-paths.d.ts +0 -11
- package/dist/scene/asset-paths.d.ts.map +0 -1
- package/dist/scene/asset-paths.js +0 -108
- package/dist/scene/asset-ref-check.d.ts +0 -88
- package/dist/scene/asset-ref-check.d.ts.map +0 -1
- package/dist/scene/asset-ref-check.js +0 -214
- package/dist/scene/asset-registry.d.ts +0 -38
- package/dist/scene/asset-registry.d.ts.map +0 -1
- package/dist/scene/asset-registry.js +0 -66
- package/dist/scene/collider-dimensions.d.ts +0 -63
- package/dist/scene/collider-dimensions.d.ts.map +0 -1
- package/dist/scene/collider-dimensions.js +0 -98
- package/dist/scene/component-registry.d.ts +0 -22
- package/dist/scene/component-registry.d.ts.map +0 -1
- package/dist/scene/component-registry.js +0 -37
- package/dist/scene/defaults.d.ts +0 -252
- package/dist/scene/defaults.d.ts.map +0 -1
- package/dist/scene/defaults.js +0 -151
- package/dist/scene/geometries/index.d.ts +0 -8
- package/dist/scene/geometries/index.d.ts.map +0 -1
- package/dist/scene/geometries/index.js +0 -7
- package/dist/scene/geometries/terrain.d.ts +0 -2
- package/dist/scene/geometries/terrain.d.ts.map +0 -1
- package/dist/scene/geometries/terrain.js +0 -37
- package/dist/scene/geometry-registry.d.ts +0 -24
- package/dist/scene/geometry-registry.d.ts.map +0 -1
- package/dist/scene/geometry-registry.js +0 -20
- package/dist/scene/instance-registry.d.ts +0 -36
- package/dist/scene/instance-registry.d.ts.map +0 -1
- package/dist/scene/instance-registry.js +0 -55
- package/dist/scene/instancers/grid.d.ts +0 -2
- package/dist/scene/instancers/grid.d.ts.map +0 -1
- package/dist/scene/instancers/grid.js +0 -36
- package/dist/scene/instancers/index.d.ts +0 -8
- package/dist/scene/instancers/index.d.ts.map +0 -1
- package/dist/scene/instancers/index.js +0 -7
- package/dist/scene/light-camera-factory.d.ts +0 -23
- package/dist/scene/light-camera-factory.d.ts.map +0 -1
- package/dist/scene/light-camera-factory.js +0 -68
- package/dist/scene/material-factory.d.ts +0 -17
- package/dist/scene/material-factory.d.ts.map +0 -1
- package/dist/scene/material-factory.js +0 -197
- package/dist/scene/material-registry.d.ts +0 -40
- package/dist/scene/material-registry.d.ts.map +0 -1
- package/dist/scene/material-registry.js +0 -44
- package/dist/scene/materials/index.d.ts +0 -8
- package/dist/scene/materials/index.d.ts.map +0 -1
- package/dist/scene/materials/index.js +0 -7
- package/dist/scene/materials/water.d.ts +0 -2
- package/dist/scene/materials/water.d.ts.map +0 -1
- package/dist/scene/materials/water.js +0 -54
- package/dist/scene/parse.d.ts +0 -23
- package/dist/scene/parse.d.ts.map +0 -1
- package/dist/scene/parse.js +0 -179
- package/dist/scene/particles-factory.d.ts +0 -33
- package/dist/scene/particles-factory.d.ts.map +0 -1
- package/dist/scene/particles-factory.js +0 -282
- package/dist/scene/scene-apply.d.ts +0 -109
- package/dist/scene/scene-apply.d.ts.map +0 -1
- package/dist/scene/scene-apply.js +0 -370
- package/dist/scene/scene-diff-schema.d.ts +0 -285
- package/dist/scene/scene-diff-schema.d.ts.map +0 -1
- package/dist/scene/scene-diff-schema.js +0 -92
- package/dist/scene/scene-diff-types.d.ts +0 -40
- package/dist/scene/scene-diff-types.d.ts.map +0 -1
- package/dist/scene/scene-diff-types.js +0 -14
- package/dist/scene/scene-loader.d.ts +0 -167
- package/dist/scene/scene-loader.d.ts.map +0 -1
- package/dist/scene/scene-loader.js +0 -1211
- package/dist/scene/scene-query.d.ts +0 -11
- package/dist/scene/scene-query.d.ts.map +0 -1
- package/dist/scene/scene-query.js +0 -63
- package/dist/scene/scene-types.d.ts +0 -10
- package/dist/scene/scene-types.d.ts.map +0 -1
- package/dist/scene/scene-types.js +0 -8
- package/dist/scene/scene-version.d.ts +0 -26
- package/dist/scene/scene-version.d.ts.map +0 -1
- package/dist/scene/scene-version.js +0 -34
- package/dist/scene/schema/animation.d.ts +0 -8
- package/dist/scene/schema/animation.d.ts.map +0 -1
- package/dist/scene/schema/animation.js +0 -42
- package/dist/scene/schema/audio.d.ts +0 -13
- package/dist/scene/schema/audio.d.ts.map +0 -1
- package/dist/scene/schema/audio.js +0 -22
- package/dist/scene/schema/camera.d.ts +0 -28
- package/dist/scene/schema/camera.d.ts.map +0 -1
- package/dist/scene/schema/camera.js +0 -17
- package/dist/scene/schema/collider.d.ts +0 -40
- package/dist/scene/schema/collider.d.ts.map +0 -1
- package/dist/scene/schema/collider.js +0 -55
- package/dist/scene/schema/entity-ref.d.ts +0 -31
- package/dist/scene/schema/entity-ref.d.ts.map +0 -1
- package/dist/scene/schema/entity-ref.js +0 -61
- package/dist/scene/schema/entity.d.ts +0 -1036
- package/dist/scene/schema/entity.d.ts.map +0 -1
- package/dist/scene/schema/entity.js +0 -153
- package/dist/scene/schema/environment.d.ts +0 -425
- package/dist/scene/schema/environment.d.ts.map +0 -1
- package/dist/scene/schema/environment.js +0 -357
- package/dist/scene/schema/index.d.ts +0 -37
- package/dist/scene/schema/index.d.ts.map +0 -1
- package/dist/scene/schema/index.js +0 -19
- package/dist/scene/schema/instances.d.ts +0 -14
- package/dist/scene/schema/instances.d.ts.map +0 -1
- package/dist/scene/schema/instances.js +0 -28
- package/dist/scene/schema/joint.d.ts +0 -23
- package/dist/scene/schema/joint.d.ts.map +0 -1
- package/dist/scene/schema/joint.js +0 -23
- package/dist/scene/schema/light.d.ts +0 -38
- package/dist/scene/schema/light.d.ts.map +0 -1
- package/dist/scene/schema/light.js +0 -26
- package/dist/scene/schema/material.d.ts +0 -199
- package/dist/scene/schema/material.d.ts.map +0 -1
- package/dist/scene/schema/material.js +0 -103
- package/dist/scene/schema/mesh.d.ts +0 -48
- package/dist/scene/schema/mesh.d.ts.map +0 -1
- package/dist/scene/schema/mesh.js +0 -82
- package/dist/scene/schema/particles.d.ts +0 -2178
- package/dist/scene/schema/particles.d.ts.map +0 -1
- package/dist/scene/schema/particles.js +0 -321
- package/dist/scene/schema/physics.d.ts +0 -56
- package/dist/scene/schema/physics.d.ts.map +0 -1
- package/dist/scene/schema/physics.js +0 -37
- package/dist/scene/schema/scene-file.d.ts +0 -303
- package/dist/scene/schema/scene-file.d.ts.map +0 -1
- package/dist/scene/schema/scene-file.js +0 -256
- package/dist/scene/schema/shadow.d.ts +0 -28
- package/dist/scene/schema/shadow.d.ts.map +0 -1
- package/dist/scene/schema/shadow.js +0 -20
- package/dist/scene/schema/spline.d.ts +0 -25
- package/dist/scene/schema/spline.d.ts.map +0 -1
- package/dist/scene/schema/spline.js +0 -15
- package/dist/scene/schema/tuples.d.ts +0 -12
- package/dist/scene/schema/tuples.d.ts.map +0 -1
- package/dist/scene/schema/tuples.js +0 -14
- package/dist/scene/user-data.d.ts +0 -185
- package/dist/scene/user-data.d.ts.map +0 -1
- package/dist/scene/user-data.js +0 -144
- package/dist/setup/setup-audio.d.ts +0 -20
- package/dist/setup/setup-audio.d.ts.map +0 -1
- package/dist/setup/setup-audio.js +0 -41
- package/dist/setup/setup-particles.d.ts +0 -17
- package/dist/setup/setup-particles.d.ts.map +0 -1
- package/dist/setup/setup-particles.js +0 -16
- package/dist/setup/setup-physics.d.ts +0 -25
- package/dist/setup/setup-physics.d.ts.map +0 -1
- package/dist/setup/setup-physics.js +0 -51
- package/dist/setup/setup-renderer.d.ts +0 -69
- package/dist/setup/setup-renderer.d.ts.map +0 -1
- package/dist/setup/setup-renderer.js +0 -363
- package/dist/tools/define-tool.d.ts +0 -130
- package/dist/tools/define-tool.d.ts.map +0 -1
- package/dist/tools/define-tool.js +0 -96
- package/dist/world2d/authoring-2d.d.ts +0 -80
- package/dist/world2d/authoring-2d.d.ts.map +0 -1
- package/dist/world2d/authoring-2d.js +0 -195
- package/dist/world2d/capture-to-scene2d.d.ts +0 -5
- package/dist/world2d/capture-to-scene2d.d.ts.map +0 -1
- package/dist/world2d/capture-to-scene2d.js +0 -49
- package/dist/world2d/collision-2d.d.ts +0 -52
- package/dist/world2d/collision-2d.d.ts.map +0 -1
- package/dist/world2d/collision-2d.js +0 -70
- package/dist/world2d/components-2d.d.ts +0 -47
- package/dist/world2d/components-2d.d.ts.map +0 -1
- package/dist/world2d/components-2d.js +0 -77
- package/dist/world2d/index.d.ts +0 -34
- package/dist/world2d/index.d.ts.map +0 -1
- package/dist/world2d/index.js +0 -32
- package/dist/world2d/ingest-iframe-2d.d.ts +0 -82
- package/dist/world2d/ingest-iframe-2d.d.ts.map +0 -1
- package/dist/world2d/ingest-iframe-2d.js +0 -166
- package/dist/world2d/ingest2d.d.ts +0 -97
- package/dist/world2d/ingest2d.d.ts.map +0 -1
- package/dist/world2d/ingest2d.js +0 -40
- package/dist/world2d/physics2d-registry.d.ts +0 -24
- package/dist/world2d/physics2d-registry.d.ts.map +0 -1
- package/dist/world2d/physics2d-registry.js +0 -38
- package/dist/world2d/pixi-game-adapter.d.ts +0 -107
- package/dist/world2d/pixi-game-adapter.d.ts.map +0 -1
- package/dist/world2d/pixi-game-adapter.js +0 -210
- package/dist/world2d/pixi-surface.d.ts +0 -39
- package/dist/world2d/pixi-surface.d.ts.map +0 -1
- package/dist/world2d/pixi-surface.js +0 -47
- package/dist/world2d/scene-capture-2d.d.ts +0 -43
- package/dist/world2d/scene-capture-2d.d.ts.map +0 -1
- package/dist/world2d/scene-capture-2d.js +0 -92
- package/dist/world2d/scene2d-loader.d.ts +0 -27
- package/dist/world2d/scene2d-loader.d.ts.map +0 -1
- package/dist/world2d/scene2d-loader.js +0 -275
- package/dist/world2d/schema/entity2d.d.ts +0 -102
- package/dist/world2d/schema/entity2d.d.ts.map +0 -1
- package/dist/world2d/schema/entity2d.js +0 -119
- package/dist/world2d/schema/physics2d.d.ts +0 -46
- package/dist/world2d/schema/physics2d.d.ts.map +0 -1
- package/dist/world2d/schema/physics2d.js +0 -45
- package/dist/world2d/schema/sprite.d.ts +0 -42
- package/dist/world2d/schema/sprite.d.ts.map +0 -1
- package/dist/world2d/schema/sprite.js +0 -63
- package/dist/world2d/schema/tilemap.d.ts +0 -15
- package/dist/world2d/schema/tilemap.d.ts.map +0 -1
- package/dist/world2d/schema/tilemap.js +0 -19
- package/dist/world2d/schema/tuples2d.d.ts +0 -20
- package/dist/world2d/schema/tuples2d.d.ts.map +0 -1
- package/dist/world2d/schema/tuples2d.js +0 -19
- package/dist/world2d/system-adapters-2d.d.ts +0 -16
- package/dist/world2d/system-adapters-2d.d.ts.map +0 -1
- package/dist/world2d/system-adapters-2d.js +0 -37
- package/dist/world2d/transform-writer-2d.d.ts +0 -16
- package/dist/world2d/transform-writer-2d.d.ts.map +0 -1
- package/dist/world2d/transform-writer-2d.js +0 -22
- package/dist/world2d/types.d.ts +0 -59
- package/dist/world2d/types.d.ts.map +0 -1
- package/dist/world2d/types.js +0 -1
package/dist/manifest/load.js
DELETED
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
// T3.1 slice 1 — the game manifest loader/validator (docs/GAME-MANIFEST-DESIGN.md §5).
|
|
2
|
-
//
|
|
3
|
-
// Pure data-in/data-out: `loadGameManifest(raw)` parses `raw` against
|
|
4
|
-
// `GameManifestSchema`, runs the cross-field checks §3 promises beyond what
|
|
5
|
-
// Zod alone can express, resolves every optional/derivable field, and
|
|
6
|
-
// returns a `ResolvedGameManifest` with nothing left implicit. This is the
|
|
7
|
-
// schema's runtime reader (T4.1 policy) — every described field in
|
|
8
|
-
// `schema.ts` either drives a check here or is carried into the resolved
|
|
9
|
-
// output explicitly (see the per-field comments below and
|
|
10
|
-
// `packages/engine/test/schema-consumption-map.ts`'s `manifest.*` entries).
|
|
11
|
-
//
|
|
12
|
-
// No `fs` import here on purpose — `load-file.ts` is the thin Node-only
|
|
13
|
-
// wrapper that reads a path and calls this function, so browser bundles that
|
|
14
|
-
// only need `loadGameManifest` never pull in `node:fs`.
|
|
15
|
-
import { GameManifestSchema, } from './schema';
|
|
16
|
-
// ---------------------------------------------------------------------------
|
|
17
|
-
// §4 — the per-context ceiling table (named + exported: the tier-table doc
|
|
18
|
-
// test in slice 2 pins docs/CAPABILITY-TIERS.md's rows against this).
|
|
19
|
-
// ---------------------------------------------------------------------------
|
|
20
|
-
/**
|
|
21
|
-
* Ceiling (maximum legal declared `Tier`) per adapter type and delivery
|
|
22
|
-
* context. `default` roots are always first-party in both contexts (D6/§2 —
|
|
23
|
-
* a first-party root is fully vgai-native everywhere). `ingest` roots are
|
|
24
|
-
* ceilinged by their own capture `strategy`: locally the local CLI's Vite
|
|
25
|
-
* pipeline gives bundler dedupe, so every strategy reaches its own natural
|
|
26
|
-
* rung; hosted has no bundler (esbuild-wasm + externals only), and a
|
|
27
|
-
* `deduped` root is DEFINED by being source built through our pipeline — no
|
|
28
|
-
* prebuilt bundle exists to fall back to an iframe rung, and nothing
|
|
29
|
-
* implements a hosted build for it, so hosted is `unsupported` (honesty over
|
|
30
|
-
* optimism; if the hosted esbuild-wasm path ever proves capable, raising
|
|
31
|
-
* this ceiling is a non-breaking widening). `shared`/`iframe-reachable`/
|
|
32
|
-
* `opaque-embed` don't depend on a bundler either way, so they carry through
|
|
33
|
-
* unchanged. `module` adapters have no derivable ceiling ("a custom
|
|
34
|
-
* adapter's reach is not derivable", §4) — modeled here as `first-party`
|
|
35
|
-
* (the top rank), i.e. no ceiling actually constrains a module adapter's
|
|
36
|
-
* declared tier; the loader instead requires the tier to be declared
|
|
37
|
-
* explicitly for module roots (see `resolveCapabilities`), since there is no
|
|
38
|
-
* default to derive.
|
|
39
|
-
*/
|
|
40
|
-
export const CAPABILITY_CEILINGS = {
|
|
41
|
-
builtin: { local: 'first-party', hosted: 'first-party' },
|
|
42
|
-
ingest: {
|
|
43
|
-
shared: { local: 'shared', hosted: 'shared' },
|
|
44
|
-
deduped: { local: 'deduped', hosted: 'unsupported' },
|
|
45
|
-
'iframe-reachable': { local: 'iframe-reachable', hosted: 'iframe-reachable' },
|
|
46
|
-
'opaque-embed': { local: 'opaque-embed', hosted: 'opaque-embed' },
|
|
47
|
-
},
|
|
48
|
-
module: { local: 'first-party', hosted: 'first-party' },
|
|
49
|
-
};
|
|
50
|
-
/** Total order over `Tier` (§4: `first-party > shared ≈ deduped > iframe-reachable > opaque-embed > unsupported`). */
|
|
51
|
-
const TIER_RANK = {
|
|
52
|
-
'first-party': 5,
|
|
53
|
-
shared: 4,
|
|
54
|
-
deduped: 4,
|
|
55
|
-
'iframe-reachable': 3,
|
|
56
|
-
'opaque-embed': 2,
|
|
57
|
-
unsupported: 1,
|
|
58
|
-
};
|
|
59
|
-
/** Default relative path for `server.module` when omitted (§3) — the scaffolded Colyseus bootstrap. */
|
|
60
|
-
export const DEFAULT_SERVER_MODULE = 'server/colyseus-setup.ts';
|
|
61
|
-
const SEMVER_RE = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z-.]+)?(?:\+[0-9A-Za-z-.]+)?$/;
|
|
62
|
-
// ---------------------------------------------------------------------------
|
|
63
|
-
// Adapter shape guards
|
|
64
|
-
// ---------------------------------------------------------------------------
|
|
65
|
-
function isModuleAdapter(adapter) {
|
|
66
|
-
return typeof adapter === 'object' && 'module' in adapter;
|
|
67
|
-
}
|
|
68
|
-
function isIngestAdapter(adapter) {
|
|
69
|
-
return typeof adapter === 'object' && 'ingest' in adapter;
|
|
70
|
-
}
|
|
71
|
-
// ---------------------------------------------------------------------------
|
|
72
|
-
// Cross-field checks (§3 — beyond what Zod alone enforces)
|
|
73
|
-
// ---------------------------------------------------------------------------
|
|
74
|
-
//
|
|
75
|
-
// D-V6 (docs/WAVE5-MULTIWORLD-INGEST-DESIGN.md): root-id uniqueness used to
|
|
76
|
-
// be a cross-field check HERE (`checkUniqueWorldIds`, removed) — it moved
|
|
77
|
-
// INTO `GameManifestSchema`'s `roots` `superRefine` (schema.ts) instead, so
|
|
78
|
-
// the generated JSON Schema and any other schema consumer see the same
|
|
79
|
-
// constraint the loader always enforced. `parseManifest` below catches that
|
|
80
|
-
// one recognizable schema-level issue and rethrows it as a clean, single
|
|
81
|
-
// `Error` — the exact message shape `checkUniqueWorldIds` used to throw
|
|
82
|
-
// directly — rather than a raw multi-issue `ZodError` dump, so existing
|
|
83
|
-
// callers/tests that pattern-match the message text are unaffected by the
|
|
84
|
-
// enforcement moving one layer down.
|
|
85
|
-
function checkAdapterSceneEntryRules(root) {
|
|
86
|
-
const { adapter } = root;
|
|
87
|
-
if (typeof adapter === 'string' && !root.scene && !root.entry) {
|
|
88
|
-
throw new Error(`Game manifest: root "${root.id}" uses the '${adapter}' adapter but declares neither ` +
|
|
89
|
-
'`scene` nor `entry` — a built-in adapter root requires an authored document or entry.');
|
|
90
|
-
}
|
|
91
|
-
if (adapter === 'react' && root.scene !== undefined) {
|
|
92
|
-
throw new Error(`Game manifest: React root "${root.id}" declares \`scene\` — React roots use JSX entry modules.`);
|
|
93
|
-
}
|
|
94
|
-
if (isIngestAdapter(adapter) && root.scene !== undefined) {
|
|
95
|
-
throw new Error(`Game manifest: root "${root.id}" uses an { ingest } adapter but declares \`scene\` — ` +
|
|
96
|
-
'ingest adapters forbid `scene` (adapt-never-migrate: ingested games keep their own ' +
|
|
97
|
-
"formats; overlay persistence is T3.2's) (§3).");
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
// Historical note (Track N, N1): this file used to reject EVERY `kind:
|
|
101
|
-
// 'react'` + `{ ingest }` root outright here (`checkReactAdapterRestriction`,
|
|
102
|
-
// citing "no react ingest program is un-parked"). Track N un-parks exactly
|
|
103
|
-
// that program (docs/REACT-INGEST-LANDING-DESIGN.md) — react+ingest is now a
|
|
104
|
-
// structurally legal combination, resolved to the `'ingest-react'` identity
|
|
105
|
-
// by `resolveAdapter` below like any other ingest root. There is nothing
|
|
106
|
-
// left to reject at THIS layer: `checkAdapterSceneEntryRules` above already
|
|
107
|
-
// forbids `scene` on any `{ ingest }`-adapter root (kind-agnostic), and the
|
|
108
|
-
// v1 "deduped strategy only" restriction is an editor-resolver concern
|
|
109
|
-
// (D-N3), not a manifest-shape concern — see the `ResolvedAdapter` type's
|
|
110
|
-
// comment above.
|
|
111
|
-
// ---------------------------------------------------------------------------
|
|
112
|
-
// Resolution (§5)
|
|
113
|
-
// ---------------------------------------------------------------------------
|
|
114
|
-
function resolveAdapter(root) {
|
|
115
|
-
const { adapter } = root;
|
|
116
|
-
if (typeof adapter === 'string') {
|
|
117
|
-
return { type: 'builtin', identity: adapter, surface: adapter };
|
|
118
|
-
}
|
|
119
|
-
if (isModuleAdapter(adapter)) {
|
|
120
|
-
return {
|
|
121
|
-
type: 'module',
|
|
122
|
-
identity: 'module',
|
|
123
|
-
module: adapter.module,
|
|
124
|
-
surface: adapter.surface,
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
// isIngestAdapter (Track N, N1: 'ingest-react' joins 'ingest-three'/
|
|
128
|
-
// 'ingest-pixi' — see the `ResolvedAdapter` type's comment above for why
|
|
129
|
-
// this stays strategy-agnostic here).
|
|
130
|
-
const identity = adapter.surface === 'threejs'
|
|
131
|
-
? 'ingest-three'
|
|
132
|
-
: adapter.surface === 'pixijs'
|
|
133
|
-
? 'ingest-pixi'
|
|
134
|
-
: 'ingest-react';
|
|
135
|
-
const ingest = adapter.ingest;
|
|
136
|
-
return {
|
|
137
|
-
type: 'ingest',
|
|
138
|
-
identity,
|
|
139
|
-
surface: adapter.surface,
|
|
140
|
-
strategy: ingest.strategy,
|
|
141
|
-
entryHtml: ingest.entryHtml,
|
|
142
|
-
assets: ingest.assets,
|
|
143
|
-
domStubs: ingest.domStubs,
|
|
144
|
-
captureTimeoutMs: ingest.captureTimeoutMs,
|
|
145
|
-
bundleUrl: ingest.bundleUrl,
|
|
146
|
-
baseHref: ingest.baseHref,
|
|
147
|
-
assetBaseUrl: ingest.assetBaseUrl,
|
|
148
|
-
extraDeps: ingest.extraDeps,
|
|
149
|
-
pixiModuleUrl: ingest.pixiModuleUrl,
|
|
150
|
-
bodyHtml: ingest.bodyHtml,
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
function ceilingFor(adapter, context) {
|
|
154
|
-
if (typeof adapter === 'string')
|
|
155
|
-
return CAPABILITY_CEILINGS.builtin[context];
|
|
156
|
-
if (isModuleAdapter(adapter))
|
|
157
|
-
return CAPABILITY_CEILINGS.module[context];
|
|
158
|
-
return CAPABILITY_CEILINGS.ingest[adapter.ingest.strategy][context];
|
|
159
|
-
}
|
|
160
|
-
function resolveCapabilities(root) {
|
|
161
|
-
const contexts = ['local', 'hosted'];
|
|
162
|
-
const result = {};
|
|
163
|
-
for (const context of contexts) {
|
|
164
|
-
const declared = root.capabilities?.[context];
|
|
165
|
-
if (declared !== undefined) {
|
|
166
|
-
const ceiling = ceilingFor(root.adapter, context);
|
|
167
|
-
if (TIER_RANK[declared] > TIER_RANK[ceiling]) {
|
|
168
|
-
throw new Error(`Game manifest: root "${root.id}": declared capabilities.${context} tier "${declared}" ` +
|
|
169
|
-
`exceeds the "${ceiling}" ceiling for this adapter in the ${context} context (§4). ` +
|
|
170
|
-
'Under-claiming (including `unsupported`) is legal; over-claiming is not.');
|
|
171
|
-
}
|
|
172
|
-
result[context] = declared;
|
|
173
|
-
continue;
|
|
174
|
-
}
|
|
175
|
-
// Omitted -> derive.
|
|
176
|
-
if (typeof root.adapter === 'string') {
|
|
177
|
-
result[context] = 'first-party';
|
|
178
|
-
}
|
|
179
|
-
else if (isModuleAdapter(root.adapter)) {
|
|
180
|
-
throw new Error(`Game manifest: root "${root.id}": { module } adapter requires an explicit ` +
|
|
181
|
-
`capabilities.${context} declaration — a custom adapter's reach is not derivable (§4).`);
|
|
182
|
-
}
|
|
183
|
-
else {
|
|
184
|
-
result[context] = CAPABILITY_CEILINGS.ingest[root.adapter.ingest.strategy][context];
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
return result;
|
|
188
|
-
}
|
|
189
|
-
function checkEngineVersionPin(version) {
|
|
190
|
-
if (!SEMVER_RE.test(version)) {
|
|
191
|
-
throw new Error(`Game manifest: engine.version "${version}" is not a valid exact semver string (e.g. ` +
|
|
192
|
-
'"0.1.0") — §1.5 requires an exact identity pin, not a range.');
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Resolve one already-Zod-validated root entry into its `ResolvedAdapterRoot`
|
|
197
|
-
* (adapter identity, capabilities, and a pass-through of every other field).
|
|
198
|
-
* Every `AdapterRoot` field participates here or in a check above:
|
|
199
|
-
* `id` drives uniqueness; `adapter` (incl. its surface and
|
|
200
|
-
* `module`/`ingest.*` sub-fields) drives identity + capability-ceiling
|
|
201
|
-
* resolution; `scene`/`entry` drive the scene/entry cross-field rule and are
|
|
202
|
-
* carried through; `zOrder` drives the final sort; `pausable`/`loop` are
|
|
203
|
-
* carried through as-is (their consumers are the runtime/CLI, T3.2/T3.3);
|
|
204
|
-
* `capabilities.{local,hosted}` drive tier resolution; `description` (T3.3
|
|
205
|
-
* slice 3) is carried through as-is — its consumer today is
|
|
206
|
-
* `resolveIngestDescriptor` (packages/editor/src/adapter-resolver.ts), which
|
|
207
|
-
* threads an ingest-three root's description into `IngestGame.description`.
|
|
208
|
-
*/
|
|
209
|
-
function resolveRoot(root) {
|
|
210
|
-
checkAdapterSceneEntryRules(root);
|
|
211
|
-
const adapter = resolveAdapter(root);
|
|
212
|
-
return {
|
|
213
|
-
id: root.id,
|
|
214
|
-
surface: adapter.surface,
|
|
215
|
-
description: root.description,
|
|
216
|
-
adapter,
|
|
217
|
-
scene: root.scene,
|
|
218
|
-
entry: root.entry,
|
|
219
|
-
zOrder: root.zOrder,
|
|
220
|
-
pausable: root.pausable,
|
|
221
|
-
loop: root.loop,
|
|
222
|
-
capabilities: resolveCapabilities(root),
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
// ---------------------------------------------------------------------------
|
|
226
|
-
// Entry point
|
|
227
|
-
// ---------------------------------------------------------------------------
|
|
228
|
-
/**
|
|
229
|
-
* Parse + validate + resolve a raw manifest value into a `ResolvedGameManifest`.
|
|
230
|
-
* Pure data-in/data-out (no `fs`) — see `load-file.ts` for the Node path-based
|
|
231
|
-
* wrapper. Throws a descriptive `Error` (naming the offending root/field) on
|
|
232
|
-
* any Zod validation failure or cross-field rule violation.
|
|
233
|
-
*/
|
|
234
|
-
export function loadGameManifest(raw) {
|
|
235
|
-
const parsed = GameManifestSchema.safeParse(raw);
|
|
236
|
-
if (!parsed.success) {
|
|
237
|
-
// D-V6: the `roots` `superRefine`'s duplicate-id issue is the one
|
|
238
|
-
// schema-level violation this loader still surfaces as a clean, single
|
|
239
|
-
// `Error` (matching `checkUniqueWorldIds`'s pre-D-V6 message shape) —
|
|
240
|
-
// every other schema violation keeps propagating as the raw `ZodError`
|
|
241
|
-
// it always has (unchanged behavior, e.g. the iframe-reachable
|
|
242
|
-
// field-exclusivity / manifestVersion checks).
|
|
243
|
-
const dupIssue = parsed.error.issues.find((issue) => issue.message.startsWith('Game manifest: duplicate root id'));
|
|
244
|
-
if (dupIssue)
|
|
245
|
-
throw new Error(dupIssue.message);
|
|
246
|
-
throw parsed.error;
|
|
247
|
-
}
|
|
248
|
-
const manifest = parsed.data;
|
|
249
|
-
checkEngineVersionPin(manifest.engine.version);
|
|
250
|
-
const resolvedWithIndex = manifest.roots.map((root, index) => ({
|
|
251
|
-
root: resolveRoot(root),
|
|
252
|
-
index,
|
|
253
|
-
}));
|
|
254
|
-
resolvedWithIndex.sort((a, b) => a.root.zOrder - b.root.zOrder || a.index - b.index);
|
|
255
|
-
const roots = resolvedWithIndex.map(({ root }) => root);
|
|
256
|
-
const server = manifest.server
|
|
257
|
-
? { room: manifest.server.room, module: manifest.server.module ?? DEFAULT_SERVER_MODULE }
|
|
258
|
-
: undefined;
|
|
259
|
-
return {
|
|
260
|
-
manifestVersion: manifest.manifestVersion,
|
|
261
|
-
name: manifest.name,
|
|
262
|
-
appId: manifest.appId,
|
|
263
|
-
editorPort: manifest.editorPort,
|
|
264
|
-
version: manifest.version,
|
|
265
|
-
engine: { version: manifest.engine.version },
|
|
266
|
-
roots,
|
|
267
|
-
server,
|
|
268
|
-
resolution: manifest.resolution,
|
|
269
|
-
authoring: manifest.authoring,
|
|
270
|
-
debug: manifest.debug,
|
|
271
|
-
determinism: manifest.determinism,
|
|
272
|
-
};
|
|
273
|
-
}
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Current on-disk `vgai.game.json` format. Exported so editor/server
|
|
4
|
-
* compatibility checks do not duplicate the schema's literal value.
|
|
5
|
-
*/
|
|
6
|
-
export declare const GAME_MANIFEST_VERSION: 2;
|
|
7
|
-
export declare const IngestStrategySchema: z.ZodEnum<{
|
|
8
|
-
shared: "shared";
|
|
9
|
-
deduped: "deduped";
|
|
10
|
-
"iframe-reachable": "iframe-reachable";
|
|
11
|
-
"opaque-embed": "opaque-embed";
|
|
12
|
-
}>;
|
|
13
|
-
export type IngestStrategy = z.infer<typeof IngestStrategySchema>;
|
|
14
|
-
export declare const TierSchema: z.ZodEnum<{
|
|
15
|
-
shared: "shared";
|
|
16
|
-
deduped: "deduped";
|
|
17
|
-
"iframe-reachable": "iframe-reachable";
|
|
18
|
-
"opaque-embed": "opaque-embed";
|
|
19
|
-
"first-party": "first-party";
|
|
20
|
-
unsupported: "unsupported";
|
|
21
|
-
}>;
|
|
22
|
-
export type Tier = z.infer<typeof TierSchema>;
|
|
23
|
-
export declare const RootAdapterSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
24
|
-
threejs: "threejs";
|
|
25
|
-
pixijs: "pixijs";
|
|
26
|
-
react: "react";
|
|
27
|
-
}>, z.ZodObject<{
|
|
28
|
-
module: z.ZodString;
|
|
29
|
-
surface: z.ZodEnum<{
|
|
30
|
-
threejs: "threejs";
|
|
31
|
-
pixijs: "pixijs";
|
|
32
|
-
react: "react";
|
|
33
|
-
}>;
|
|
34
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
35
|
-
surface: z.ZodEnum<{
|
|
36
|
-
threejs: "threejs";
|
|
37
|
-
pixijs: "pixijs";
|
|
38
|
-
react: "react";
|
|
39
|
-
}>;
|
|
40
|
-
ingest: z.ZodObject<{
|
|
41
|
-
strategy: z.ZodEnum<{
|
|
42
|
-
shared: "shared";
|
|
43
|
-
deduped: "deduped";
|
|
44
|
-
"iframe-reachable": "iframe-reachable";
|
|
45
|
-
"opaque-embed": "opaque-embed";
|
|
46
|
-
}>;
|
|
47
|
-
entryHtml: z.ZodOptional<z.ZodString>;
|
|
48
|
-
assets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
49
|
-
domStubs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
50
|
-
captureTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
51
|
-
bundleUrl: z.ZodOptional<z.ZodString>;
|
|
52
|
-
baseHref: z.ZodOptional<z.ZodString>;
|
|
53
|
-
assetBaseUrl: z.ZodOptional<z.ZodString>;
|
|
54
|
-
extraDeps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
55
|
-
pixiModuleUrl: z.ZodOptional<z.ZodString>;
|
|
56
|
-
bodyHtml: z.ZodOptional<z.ZodString>;
|
|
57
|
-
}, z.core.$strip>;
|
|
58
|
-
}, z.core.$strict>]>;
|
|
59
|
-
export type RootAdapter = z.infer<typeof RootAdapterSchema>;
|
|
60
|
-
export declare const AdapterRootSchema: z.ZodObject<{
|
|
61
|
-
id: z.ZodString;
|
|
62
|
-
description: z.ZodOptional<z.ZodString>;
|
|
63
|
-
adapter: z.ZodUnion<readonly [z.ZodEnum<{
|
|
64
|
-
threejs: "threejs";
|
|
65
|
-
pixijs: "pixijs";
|
|
66
|
-
react: "react";
|
|
67
|
-
}>, z.ZodObject<{
|
|
68
|
-
module: z.ZodString;
|
|
69
|
-
surface: z.ZodEnum<{
|
|
70
|
-
threejs: "threejs";
|
|
71
|
-
pixijs: "pixijs";
|
|
72
|
-
react: "react";
|
|
73
|
-
}>;
|
|
74
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
75
|
-
surface: z.ZodEnum<{
|
|
76
|
-
threejs: "threejs";
|
|
77
|
-
pixijs: "pixijs";
|
|
78
|
-
react: "react";
|
|
79
|
-
}>;
|
|
80
|
-
ingest: z.ZodObject<{
|
|
81
|
-
strategy: z.ZodEnum<{
|
|
82
|
-
shared: "shared";
|
|
83
|
-
deduped: "deduped";
|
|
84
|
-
"iframe-reachable": "iframe-reachable";
|
|
85
|
-
"opaque-embed": "opaque-embed";
|
|
86
|
-
}>;
|
|
87
|
-
entryHtml: z.ZodOptional<z.ZodString>;
|
|
88
|
-
assets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
89
|
-
domStubs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
90
|
-
captureTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
91
|
-
bundleUrl: z.ZodOptional<z.ZodString>;
|
|
92
|
-
baseHref: z.ZodOptional<z.ZodString>;
|
|
93
|
-
assetBaseUrl: z.ZodOptional<z.ZodString>;
|
|
94
|
-
extraDeps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
95
|
-
pixiModuleUrl: z.ZodOptional<z.ZodString>;
|
|
96
|
-
bodyHtml: z.ZodOptional<z.ZodString>;
|
|
97
|
-
}, z.core.$strip>;
|
|
98
|
-
}, z.core.$strict>]>;
|
|
99
|
-
scene: z.ZodOptional<z.ZodString>;
|
|
100
|
-
entry: z.ZodOptional<z.ZodString>;
|
|
101
|
-
zOrder: z.ZodDefault<z.ZodNumber>;
|
|
102
|
-
pausable: z.ZodDefault<z.ZodBoolean>;
|
|
103
|
-
loop: z.ZodDefault<z.ZodEnum<{
|
|
104
|
-
gated: "gated";
|
|
105
|
-
"self-driven": "self-driven";
|
|
106
|
-
}>>;
|
|
107
|
-
capabilities: z.ZodOptional<z.ZodObject<{
|
|
108
|
-
local: z.ZodOptional<z.ZodEnum<{
|
|
109
|
-
shared: "shared";
|
|
110
|
-
deduped: "deduped";
|
|
111
|
-
"iframe-reachable": "iframe-reachable";
|
|
112
|
-
"opaque-embed": "opaque-embed";
|
|
113
|
-
"first-party": "first-party";
|
|
114
|
-
unsupported: "unsupported";
|
|
115
|
-
}>>;
|
|
116
|
-
hosted: z.ZodOptional<z.ZodEnum<{
|
|
117
|
-
shared: "shared";
|
|
118
|
-
deduped: "deduped";
|
|
119
|
-
"iframe-reachable": "iframe-reachable";
|
|
120
|
-
"opaque-embed": "opaque-embed";
|
|
121
|
-
"first-party": "first-party";
|
|
122
|
-
unsupported: "unsupported";
|
|
123
|
-
}>>;
|
|
124
|
-
}, z.core.$strip>>;
|
|
125
|
-
}, z.core.$strict>;
|
|
126
|
-
export type AdapterRoot = z.infer<typeof AdapterRootSchema>;
|
|
127
|
-
export declare const GameManifestSchema: z.ZodObject<{
|
|
128
|
-
$schema: z.ZodOptional<z.ZodString>;
|
|
129
|
-
manifestVersion: z.ZodLiteral<2>;
|
|
130
|
-
name: z.ZodString;
|
|
131
|
-
appId: z.ZodOptional<z.ZodString>;
|
|
132
|
-
editorPort: z.ZodOptional<z.ZodNumber>;
|
|
133
|
-
version: z.ZodString;
|
|
134
|
-
engine: z.ZodObject<{
|
|
135
|
-
version: z.ZodString;
|
|
136
|
-
}, z.core.$strip>;
|
|
137
|
-
roots: z.ZodArray<z.ZodObject<{
|
|
138
|
-
id: z.ZodString;
|
|
139
|
-
description: z.ZodOptional<z.ZodString>;
|
|
140
|
-
adapter: z.ZodUnion<readonly [z.ZodEnum<{
|
|
141
|
-
threejs: "threejs";
|
|
142
|
-
pixijs: "pixijs";
|
|
143
|
-
react: "react";
|
|
144
|
-
}>, z.ZodObject<{
|
|
145
|
-
module: z.ZodString;
|
|
146
|
-
surface: z.ZodEnum<{
|
|
147
|
-
threejs: "threejs";
|
|
148
|
-
pixijs: "pixijs";
|
|
149
|
-
react: "react";
|
|
150
|
-
}>;
|
|
151
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
152
|
-
surface: z.ZodEnum<{
|
|
153
|
-
threejs: "threejs";
|
|
154
|
-
pixijs: "pixijs";
|
|
155
|
-
react: "react";
|
|
156
|
-
}>;
|
|
157
|
-
ingest: z.ZodObject<{
|
|
158
|
-
strategy: z.ZodEnum<{
|
|
159
|
-
shared: "shared";
|
|
160
|
-
deduped: "deduped";
|
|
161
|
-
"iframe-reachable": "iframe-reachable";
|
|
162
|
-
"opaque-embed": "opaque-embed";
|
|
163
|
-
}>;
|
|
164
|
-
entryHtml: z.ZodOptional<z.ZodString>;
|
|
165
|
-
assets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
166
|
-
domStubs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
167
|
-
captureTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
168
|
-
bundleUrl: z.ZodOptional<z.ZodString>;
|
|
169
|
-
baseHref: z.ZodOptional<z.ZodString>;
|
|
170
|
-
assetBaseUrl: z.ZodOptional<z.ZodString>;
|
|
171
|
-
extraDeps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
172
|
-
pixiModuleUrl: z.ZodOptional<z.ZodString>;
|
|
173
|
-
bodyHtml: z.ZodOptional<z.ZodString>;
|
|
174
|
-
}, z.core.$strip>;
|
|
175
|
-
}, z.core.$strict>]>;
|
|
176
|
-
scene: z.ZodOptional<z.ZodString>;
|
|
177
|
-
entry: z.ZodOptional<z.ZodString>;
|
|
178
|
-
zOrder: z.ZodDefault<z.ZodNumber>;
|
|
179
|
-
pausable: z.ZodDefault<z.ZodBoolean>;
|
|
180
|
-
loop: z.ZodDefault<z.ZodEnum<{
|
|
181
|
-
gated: "gated";
|
|
182
|
-
"self-driven": "self-driven";
|
|
183
|
-
}>>;
|
|
184
|
-
capabilities: z.ZodOptional<z.ZodObject<{
|
|
185
|
-
local: z.ZodOptional<z.ZodEnum<{
|
|
186
|
-
shared: "shared";
|
|
187
|
-
deduped: "deduped";
|
|
188
|
-
"iframe-reachable": "iframe-reachable";
|
|
189
|
-
"opaque-embed": "opaque-embed";
|
|
190
|
-
"first-party": "first-party";
|
|
191
|
-
unsupported: "unsupported";
|
|
192
|
-
}>>;
|
|
193
|
-
hosted: z.ZodOptional<z.ZodEnum<{
|
|
194
|
-
shared: "shared";
|
|
195
|
-
deduped: "deduped";
|
|
196
|
-
"iframe-reachable": "iframe-reachable";
|
|
197
|
-
"opaque-embed": "opaque-embed";
|
|
198
|
-
"first-party": "first-party";
|
|
199
|
-
unsupported: "unsupported";
|
|
200
|
-
}>>;
|
|
201
|
-
}, z.core.$strip>>;
|
|
202
|
-
}, z.core.$strict>>;
|
|
203
|
-
authoring: z.ZodOptional<z.ZodObject<{
|
|
204
|
-
hierarchy: z.ZodOptional<z.ZodObject<{
|
|
205
|
-
rootLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
206
|
-
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
207
|
-
id: z.ZodString;
|
|
208
|
-
label: z.ZodString;
|
|
209
|
-
roots: z.ZodArray<z.ZodString>;
|
|
210
|
-
}, z.core.$strip>>>;
|
|
211
|
-
}, z.core.$strip>>;
|
|
212
|
-
}, z.core.$strip>>;
|
|
213
|
-
server: z.ZodOptional<z.ZodObject<{
|
|
214
|
-
room: z.ZodString;
|
|
215
|
-
module: z.ZodOptional<z.ZodString>;
|
|
216
|
-
}, z.core.$strip>>;
|
|
217
|
-
resolution: z.ZodOptional<z.ZodObject<{
|
|
218
|
-
width: z.ZodNumber;
|
|
219
|
-
height: z.ZodNumber;
|
|
220
|
-
}, z.core.$strip>>;
|
|
221
|
-
debug: z.ZodOptional<z.ZodObject<{
|
|
222
|
-
allowInProduction: z.ZodBoolean;
|
|
223
|
-
}, z.core.$strip>>;
|
|
224
|
-
determinism: z.ZodOptional<z.ZodObject<{
|
|
225
|
-
seededRandom: z.ZodBoolean;
|
|
226
|
-
defaultSeed: z.ZodOptional<z.ZodNumber>;
|
|
227
|
-
}, z.core.$strip>>;
|
|
228
|
-
}, z.core.$strict>;
|
|
229
|
-
export type GameManifest = z.infer<typeof GameManifestSchema>;
|
|
230
|
-
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/manifest/schema.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAG,CAAU,CAAC;AAMhD,eAAO,MAAM,oBAAoB;;;;;EAK/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAMlE,eAAO,MAAM,UAAU;;;;;;;EAOrB,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAS9C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAuL3B,CAAC;AACJ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAM5D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA4DnB,CAAC;AACZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAM5D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8JsD,CAAC;AAEtF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|