@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
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Render-mode AUDIO control seam (I6, `docs/AI-NATIVE-AUTHORING-
|
|
3
|
-
* IMPLEMENTATION-SPEC.md` §15 I6 "Encode and Mux" + the audio-capture half of
|
|
4
|
-
* §13 G4). This is `render-control.ts`'s sibling for the audio side: where
|
|
5
|
-
* that module publishes `window.__vgaiRender` (exact-time seeks + composited
|
|
6
|
-
* frame passes), THIS module publishes `window.__vgaiRenderAudio` — an
|
|
7
|
-
* OPT-IN surface a render-mode page installs only when it declares a Tone
|
|
8
|
-
* score, so `vgai render-cinematic` (`packages/vgai-cli/src/render-
|
|
9
|
-
* cinematic.ts`) can detect "this cinematic has a deterministic audio track"
|
|
10
|
-
* with a single property check (`__vgaiRenderAudio?.hasAudio === true`)
|
|
11
|
-
* rather than needing a schema field threaded through every fixture.
|
|
12
|
-
*
|
|
13
|
-
* Deliberately a SEPARATE global from `__vgaiRender`/`VgaiRenderHarness`
|
|
14
|
-
* (`render-control.ts`), not an extra method bolted onto that interface:
|
|
15
|
-
* every existing render-mode page (I0's `render-cinematic` fixture, I8's
|
|
16
|
-
* `reference-cinematic`) has no Tone score at all, and this keeps their
|
|
17
|
-
* bundles/tests completely untouched — `render-control.ts` itself is not
|
|
18
|
-
* modified by this unit.
|
|
19
|
-
*
|
|
20
|
-
* ## Why `renderAudio` takes `(start, end)` and `compose` is a FACTORY
|
|
21
|
-
*
|
|
22
|
-
* `Tone.Offline` (via `audio/tone-offline-render.ts`) gives the composition
|
|
23
|
-
* callback LOCAL time 0 at whatever `start` was requested — an offline
|
|
24
|
-
* render of `[10, 10.72)` schedules its first event at LOCAL time 0, not
|
|
25
|
-
* absolute time 10 (see that module's own doc comment). A render-mode page
|
|
26
|
-
* authors its score in ABSOLUTE/canonical time (e.g. "a note at the same
|
|
27
|
-
* t=1.2s the video's Director cut happens"), so the actual Tone-native
|
|
28
|
-
* compose callback passed to `renderToneOffline` must subtract the
|
|
29
|
-
* requested range's `start` from every scheduled event time. Rather than
|
|
30
|
-
* have every fixture re-derive that subtraction inline, this module's
|
|
31
|
-
* {@link RenderAudioControlOptions.compose} is a FACTORY: called once per
|
|
32
|
-
* `renderAudio(start, end)` invocation with `start`, returning the actual
|
|
33
|
-
* `Tone.Offline`-native callback closed over that offset. This is the
|
|
34
|
-
* concrete fix for the G12 review follow-up named in this unit's build
|
|
35
|
-
* brief ("renderToneOffline gives the composition LOCAL time 0 at `start`,
|
|
36
|
-
* so your composition must close over the range/offset").
|
|
37
|
-
*
|
|
38
|
-
* ## Wire format — why WAV bytes cross as base64, not a raw sample array
|
|
39
|
-
*
|
|
40
|
-
* `page.evaluate`'s return value is JSON-serialized; a `Float32Array`/
|
|
41
|
-
* typed-array result would either fail to serialize or be coerced into a
|
|
42
|
-
* verbose `{ "0": ..., "1": ... }` object, and a plain JS number array of
|
|
43
|
-
* (potentially) hundreds of thousands of floats is slow to serialize and
|
|
44
|
-
* bloats the IPC payload. Encoding the FULL WAV file (header + 16-bit PCM
|
|
45
|
-
* data, `audio/wav-encode.ts`) to a single base64 string in-page keeps the
|
|
46
|
-
* Node-side capture driver (`render-cinematic.ts`) to one
|
|
47
|
-
* `Buffer.from(wavBase64, 'base64')` + one `writeFile` — no PCM assembly
|
|
48
|
-
* logic duplicated on the Node side at all.
|
|
49
|
-
*/
|
|
50
|
-
import { type ToneOfflineComposeFn } from '../audio/tone-offline-render';
|
|
51
|
-
/** Builds the actual `Tone.Offline`-native compose callback for a render
|
|
52
|
-
* starting at `rangeStart` (absolute/canonical seconds) — see the module
|
|
53
|
-
* doc's "closes over the range/offset" section above. */
|
|
54
|
-
export type RenderAudioComposeFactory = (rangeStart: number) => ToneOfflineComposeFn;
|
|
55
|
-
export interface RenderAudioControlOptions {
|
|
56
|
-
/** See {@link RenderAudioComposeFactory}. */
|
|
57
|
-
readonly compose: RenderAudioComposeFactory;
|
|
58
|
-
/** Output channel count. Default 2 (stereo) — same default as `tone-offline-render.ts`. */
|
|
59
|
-
readonly channels?: number;
|
|
60
|
-
/** Output sample rate. Default 44100 — same default as `tone-offline-render.ts`. */
|
|
61
|
-
readonly sampleRate?: number;
|
|
62
|
-
/** Where to publish the harness. Defaults to the real `window` — override in a unit test. */
|
|
63
|
-
readonly target?: Record<string, unknown>;
|
|
64
|
-
/** Where to read `?vgai-render=1` from. Defaults to `window.location`. */
|
|
65
|
-
readonly location?: {
|
|
66
|
-
readonly search: string;
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
/** One offline audio render, encoded as a complete WAV file — the exact
|
|
70
|
-
* shape `render-cinematic.ts`'s capture driver reads back via `page.evaluate`. */
|
|
71
|
-
export interface RenderAudioResult {
|
|
72
|
-
/** Base64 of a complete little-endian 16-bit-PCM RIFF/WAVE file (see
|
|
73
|
-
* `audio/wav-encode.ts`) — decode with `Buffer.from(wavBase64, 'base64')`. */
|
|
74
|
-
readonly wavBase64: string;
|
|
75
|
-
readonly sampleRate: number;
|
|
76
|
-
readonly channels: number;
|
|
77
|
-
readonly durationSeconds: number;
|
|
78
|
-
/** RMS/peak over the raw PCM, BEFORE 16-bit quantization — lets a caller
|
|
79
|
-
* assert "genuinely non-silent audio, not a muxed-in silent track"
|
|
80
|
-
* without re-decoding the WAV it just received. */
|
|
81
|
-
readonly rms: number;
|
|
82
|
-
readonly peak: number;
|
|
83
|
-
}
|
|
84
|
-
/** The `window.__vgaiRenderAudio` surface. Presence of this global (guarded
|
|
85
|
-
* by `hasAudio: true`, never a bare `undefined`/`false` value on a present
|
|
86
|
-
* object) IS the "this cinematic declares a Tone score" signal `render-
|
|
87
|
-
* cinematic.ts` checks — see this module's own top doc comment. */
|
|
88
|
-
export interface VgaiRenderAudioHarness {
|
|
89
|
-
readonly hasAudio: true;
|
|
90
|
-
/** Render `[start, end)` (absolute/canonical seconds, exactly the same
|
|
91
|
-
* range `window.__vgaiRender`'s frame walk covers) offline via
|
|
92
|
-
* `Tone.Offline`, returning a complete WAV file. Deterministic: identical
|
|
93
|
-
* `(start, end)` on an unchanged score produces byte-identical
|
|
94
|
-
* `wavBase64` every call (the same `Tone.Offline` determinism
|
|
95
|
-
* `tone-offline-render.ts`/G2 already proves — this module adds no
|
|
96
|
-
* additional source of nondeterminism). */
|
|
97
|
-
renderAudio(start: number, end: number): Promise<RenderAudioResult>;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Build (and, when render mode is actually requested, publish) the
|
|
101
|
-
* `window.__vgaiRenderAudio` harness — same AC-4-shaped production
|
|
102
|
-
* protection as `installRenderControlHarness`: even called unconditionally
|
|
103
|
-
* on every boot, this only ever constructs/attaches the harness when
|
|
104
|
-
* `isRenderModeRequested(location)` is true, so a normal production gameplay
|
|
105
|
-
* page never gets `window.__vgaiRenderAudio` (and normal play never
|
|
106
|
-
* re-renders its music through an offline context — that would be a
|
|
107
|
-
* separate, much stranger bug).
|
|
108
|
-
*/
|
|
109
|
-
export declare function installRenderAudioHarness(opts: RenderAudioControlOptions): VgaiRenderAudioHarness | undefined;
|
|
110
|
-
//# sourceMappingURL=render-audio-control.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render-audio-control.d.ts","sourceRoot":"","sources":["../../src/runtime/render-audio-control.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAqB,KAAK,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAI5F;;0DAE0D;AAC1D,MAAM,MAAM,yBAAyB,GAAG,CAAC,UAAU,EAAE,MAAM,KAAK,oBAAoB,CAAC;AAErF,MAAM,WAAW,yBAAyB;IACxC,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,EAAE,yBAAyB,CAAC;IAC5C,2FAA2F;IAC3F,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,oFAAoF;IACpF,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,6FAA6F;IAC7F,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CACjD;AAED;mFACmF;AACnF,MAAM,WAAW,iBAAiB;IAChC;mFAC+E;IAC/E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC;;wDAEoD;IACpD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;oEAGoE;AACpE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB;;;;;;gDAM4C;IAC5C,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACrE;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,yBAAyB,GAC9B,sBAAsB,GAAG,SAAS,CAoCpC"}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Render-mode AUDIO control seam (I6, `docs/AI-NATIVE-AUTHORING-
|
|
3
|
-
* IMPLEMENTATION-SPEC.md` §15 I6 "Encode and Mux" + the audio-capture half of
|
|
4
|
-
* §13 G4). This is `render-control.ts`'s sibling for the audio side: where
|
|
5
|
-
* that module publishes `window.__vgaiRender` (exact-time seeks + composited
|
|
6
|
-
* frame passes), THIS module publishes `window.__vgaiRenderAudio` — an
|
|
7
|
-
* OPT-IN surface a render-mode page installs only when it declares a Tone
|
|
8
|
-
* score, so `vgai render-cinematic` (`packages/vgai-cli/src/render-
|
|
9
|
-
* cinematic.ts`) can detect "this cinematic has a deterministic audio track"
|
|
10
|
-
* with a single property check (`__vgaiRenderAudio?.hasAudio === true`)
|
|
11
|
-
* rather than needing a schema field threaded through every fixture.
|
|
12
|
-
*
|
|
13
|
-
* Deliberately a SEPARATE global from `__vgaiRender`/`VgaiRenderHarness`
|
|
14
|
-
* (`render-control.ts`), not an extra method bolted onto that interface:
|
|
15
|
-
* every existing render-mode page (I0's `render-cinematic` fixture, I8's
|
|
16
|
-
* `reference-cinematic`) has no Tone score at all, and this keeps their
|
|
17
|
-
* bundles/tests completely untouched — `render-control.ts` itself is not
|
|
18
|
-
* modified by this unit.
|
|
19
|
-
*
|
|
20
|
-
* ## Why `renderAudio` takes `(start, end)` and `compose` is a FACTORY
|
|
21
|
-
*
|
|
22
|
-
* `Tone.Offline` (via `audio/tone-offline-render.ts`) gives the composition
|
|
23
|
-
* callback LOCAL time 0 at whatever `start` was requested — an offline
|
|
24
|
-
* render of `[10, 10.72)` schedules its first event at LOCAL time 0, not
|
|
25
|
-
* absolute time 10 (see that module's own doc comment). A render-mode page
|
|
26
|
-
* authors its score in ABSOLUTE/canonical time (e.g. "a note at the same
|
|
27
|
-
* t=1.2s the video's Director cut happens"), so the actual Tone-native
|
|
28
|
-
* compose callback passed to `renderToneOffline` must subtract the
|
|
29
|
-
* requested range's `start` from every scheduled event time. Rather than
|
|
30
|
-
* have every fixture re-derive that subtraction inline, this module's
|
|
31
|
-
* {@link RenderAudioControlOptions.compose} is a FACTORY: called once per
|
|
32
|
-
* `renderAudio(start, end)` invocation with `start`, returning the actual
|
|
33
|
-
* `Tone.Offline`-native callback closed over that offset. This is the
|
|
34
|
-
* concrete fix for the G12 review follow-up named in this unit's build
|
|
35
|
-
* brief ("renderToneOffline gives the composition LOCAL time 0 at `start`,
|
|
36
|
-
* so your composition must close over the range/offset").
|
|
37
|
-
*
|
|
38
|
-
* ## Wire format — why WAV bytes cross as base64, not a raw sample array
|
|
39
|
-
*
|
|
40
|
-
* `page.evaluate`'s return value is JSON-serialized; a `Float32Array`/
|
|
41
|
-
* typed-array result would either fail to serialize or be coerced into a
|
|
42
|
-
* verbose `{ "0": ..., "1": ... }` object, and a plain JS number array of
|
|
43
|
-
* (potentially) hundreds of thousands of floats is slow to serialize and
|
|
44
|
-
* bloats the IPC payload. Encoding the FULL WAV file (header + 16-bit PCM
|
|
45
|
-
* data, `audio/wav-encode.ts`) to a single base64 string in-page keeps the
|
|
46
|
-
* Node-side capture driver (`render-cinematic.ts`) to one
|
|
47
|
-
* `Buffer.from(wavBase64, 'base64')` + one `writeFile` — no PCM assembly
|
|
48
|
-
* logic duplicated on the Node side at all.
|
|
49
|
-
*/
|
|
50
|
-
import { renderToneOffline } from '../audio/tone-offline-render';
|
|
51
|
-
import { encodeWav16, pcmStats } from '../audio/wav-encode';
|
|
52
|
-
import { isRenderModeRequested } from './render-control';
|
|
53
|
-
/**
|
|
54
|
-
* Build (and, when render mode is actually requested, publish) the
|
|
55
|
-
* `window.__vgaiRenderAudio` harness — same AC-4-shaped production
|
|
56
|
-
* protection as `installRenderControlHarness`: even called unconditionally
|
|
57
|
-
* on every boot, this only ever constructs/attaches the harness when
|
|
58
|
-
* `isRenderModeRequested(location)` is true, so a normal production gameplay
|
|
59
|
-
* page never gets `window.__vgaiRenderAudio` (and normal play never
|
|
60
|
-
* re-renders its music through an offline context — that would be a
|
|
61
|
-
* separate, much stranger bug).
|
|
62
|
-
*/
|
|
63
|
-
export function installRenderAudioHarness(opts) {
|
|
64
|
-
const location = opts.location ?? window.location;
|
|
65
|
-
if (!isRenderModeRequested(location))
|
|
66
|
-
return undefined;
|
|
67
|
-
const target = opts.target ?? window;
|
|
68
|
-
const { compose, channels, sampleRate } = opts;
|
|
69
|
-
const harness = {
|
|
70
|
-
hasAudio: true,
|
|
71
|
-
async renderAudio(start, end) {
|
|
72
|
-
const rendered = await renderToneOffline({
|
|
73
|
-
start,
|
|
74
|
-
end,
|
|
75
|
-
...(channels !== undefined ? { channels } : {}),
|
|
76
|
-
...(sampleRate !== undefined ? { sampleRate } : {}),
|
|
77
|
-
compose: compose(start),
|
|
78
|
-
});
|
|
79
|
-
const channelData = [];
|
|
80
|
-
for (let ch = 0; ch < rendered.buffer.numberOfChannels; ch++) {
|
|
81
|
-
channelData.push(rendered.buffer.getChannelData(ch));
|
|
82
|
-
}
|
|
83
|
-
const wavBytes = encodeWav16({ channelData, sampleRate: rendered.buffer.sampleRate });
|
|
84
|
-
const stats = pcmStats(channelData);
|
|
85
|
-
return {
|
|
86
|
-
wavBase64: uint8ArrayToBase64(wavBytes),
|
|
87
|
-
sampleRate: rendered.buffer.sampleRate,
|
|
88
|
-
channels: rendered.buffer.numberOfChannels,
|
|
89
|
-
durationSeconds: rendered.durationSeconds,
|
|
90
|
-
rms: stats.rms,
|
|
91
|
-
peak: stats.peak,
|
|
92
|
-
};
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
|
-
target['__vgaiRenderAudio'] = harness;
|
|
96
|
-
return harness;
|
|
97
|
-
}
|
|
98
|
-
/** Browser-native base64 encode (`btoa`) over a `Uint8Array`, chunked so a
|
|
99
|
-
* multi-second stereo WAV doesn't blow `String.fromCharCode`'s argument-count
|
|
100
|
-
* limit in one call. Node has no `btoa` for arbitrary bytes reliably across
|
|
101
|
-
* versions, but this module only ever runs in the browser (render-mode
|
|
102
|
-
* pages), matching `tone-offline-render.ts`'s own "browser-only" contract. */
|
|
103
|
-
function uint8ArrayToBase64(bytes) {
|
|
104
|
-
const CHUNK_SIZE = 0x8000;
|
|
105
|
-
let binary = '';
|
|
106
|
-
for (let i = 0; i < bytes.length; i += CHUNK_SIZE) {
|
|
107
|
-
const chunk = bytes.subarray(i, i + CHUNK_SIZE);
|
|
108
|
-
binary += String.fromCharCode(...chunk);
|
|
109
|
-
}
|
|
110
|
-
return btoa(binary);
|
|
111
|
-
}
|
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Render-control runtime seam (I2, `docs/AI-NATIVE-AUTHORING-IMPLEMENTATION-SPEC.md`
|
|
3
|
-
* §15 I2). This is the harness a deterministic-capture host (Playwright/CDP,
|
|
4
|
-
* I0/I3/I4) drives: exact-time seeks against the canonical
|
|
5
|
-
* `AnimationClock` (`animation/animation-clock.ts`), and single
|
|
6
|
-
* `preRender`+`render` phase passes across every world on a `Game`
|
|
7
|
-
* (`runtime/game.ts`) — WITHOUT ever advancing gameplay fixed-step substeps
|
|
8
|
-
* (`input`/`prePhysics`/`physics`/`postPhysics`/`gameLogic`/`animation` are
|
|
9
|
-
* never invoked by this seam; `--simulate` (I5) is a different, later, path
|
|
10
|
-
* that deliberately drives `game.runFrame(fixedDt)` instead).
|
|
11
|
-
*
|
|
12
|
-
* This module does NOT reuse `PlayState.step()` (`Game.play.step()`) — that
|
|
13
|
-
* surface only advances the currently-FROZEN (paused) set of roots and is a
|
|
14
|
-
* whole-call no-op while unpaused (see its doc comment in `runtime/game.ts`);
|
|
15
|
-
* the spec review explicitly flagged it as the wrong seam. `renderOnce`
|
|
16
|
-
* instead walks `game.roots` directly and calls each world's own
|
|
17
|
-
* `WorldFrameHooks.runPhase` for exactly two phases.
|
|
18
|
-
*
|
|
19
|
-
* Also does NOT install anything by default — a caller must explicitly call
|
|
20
|
-
* {@link installRenderControlHarness}, and even then it only actually
|
|
21
|
-
* publishes `window.__vgaiRender` when the page's URL opts in via
|
|
22
|
-
* `?vgai-render=1` (AC 4: unavailable/protected in normal production
|
|
23
|
-
* gameplay unless explicitly enabled). See `render-seed.ts` for the
|
|
24
|
-
* matching `Math.random` determinism hardening, which must run BEFORE this
|
|
25
|
-
* module (or any other game module) is even imported.
|
|
26
|
-
*
|
|
27
|
-
* I5 (`--simulate` render, §15 I5) is implemented HERE, alongside `renderOnce`:
|
|
28
|
-
* {@link VgaiRenderHarness.simulateSubsteps} drives `game.runFrame(fixedDt)` a
|
|
29
|
-
* fixed integer number of times — the FULL fixed-step gameplay frame (every
|
|
30
|
-
* phase in `PHASE_ORDER`, including `physics`/`gameLogic`/`animation`), unlike
|
|
31
|
-
* `renderOnce`'s deliberately gameplay-free `preRender`+`render`-only pass.
|
|
32
|
-
* A caller that never invokes `simulateSubsteps` (the default, sequence-
|
|
33
|
-
* controlled render — I4) gets byte-identical behavior to before this method
|
|
34
|
-
* existed: `renderOnce`/`seek`/`seekFrame`/`advanceFrame` are untouched by
|
|
35
|
-
* this addition.
|
|
36
|
-
*/
|
|
37
|
-
import type { GameInternal } from './game';
|
|
38
|
-
/** Per-subsystem readiness verdict (I2 AC: "Runtime reports asset, shader,
|
|
39
|
-
* font, Theatre, Tone, and scene readiness"). `not-applicable` is the
|
|
40
|
-
* correct answer for any subsystem genuinely absent from a given fixture
|
|
41
|
-
* (spec note: "If a subsystem isn't present in the fixture, report it as
|
|
42
|
-
* not-applicable rather than failing") — never coerced to `ready`. */
|
|
43
|
-
export type ReadinessStatus = 'ready' | 'not-applicable' | 'error';
|
|
44
|
-
export interface ReadinessEntry {
|
|
45
|
-
readonly status: ReadinessStatus;
|
|
46
|
-
readonly detail?: string;
|
|
47
|
-
}
|
|
48
|
-
/** The full readiness report `ready()` resolves. One entry per subsystem
|
|
49
|
-
* named in the I2 AC, always present (never a sparse/optional object) so a
|
|
50
|
-
* caller can read every key unconditionally. */
|
|
51
|
-
export interface ReadinessReport {
|
|
52
|
-
readonly assets: ReadinessEntry;
|
|
53
|
-
readonly shaders: ReadinessEntry;
|
|
54
|
-
readonly fonts: ReadinessEntry;
|
|
55
|
-
readonly theatre: ReadinessEntry;
|
|
56
|
-
readonly tone: ReadinessEntry;
|
|
57
|
-
readonly scene: ReadinessEntry;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Caller-supplied per-subsystem readiness checks. Each hook is optional:
|
|
61
|
-
* absence means that subsystem genuinely does not exist in this fixture/game
|
|
62
|
-
* (reported `not-applicable`), NOT that it's assumed ready. A hook that
|
|
63
|
-
* resolves is `ready`; one that throws/rejects is `error` with the message
|
|
64
|
-
* captured (never silently swallowed, never escalated to fail the whole
|
|
65
|
-
* `ready()` call — one subsystem's failure must not hide the others' status).
|
|
66
|
-
* `fonts` has no hook slot: it is always checked directly against
|
|
67
|
-
* `document.fonts.ready` (universally meaningful in a browser render page),
|
|
68
|
-
* matching the AC's explicit `document.fonts.ready` callout.
|
|
69
|
-
*/
|
|
70
|
-
export interface RenderReadinessHooks {
|
|
71
|
-
assets?(): Promise<void> | void;
|
|
72
|
-
shaders?(): Promise<void> | void;
|
|
73
|
-
theatre?(): Promise<void> | void;
|
|
74
|
-
tone?(): Promise<void> | void;
|
|
75
|
-
scene?(): Promise<void> | void;
|
|
76
|
-
}
|
|
77
|
-
/** The minimal clock surface this seam drives — `AnimationClock`'s `seek`/
|
|
78
|
-
* `seekFrame` (`animation/animation-clock.ts`). Typed narrowly (not
|
|
79
|
-
* imported as a value) so this module never depends on the clock's full
|
|
80
|
-
* surface, just the two methods the render seam actually calls. */
|
|
81
|
-
export interface SeekableClock {
|
|
82
|
-
seek(t: number): unknown;
|
|
83
|
-
seekFrame(n: number, fps: number): unknown;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* I8 render-integration seam: a per-frame, fixed-`dt` advance hook — exactly
|
|
87
|
-
* the engine's `SystemFn` shape (`core/types.ts`) — for a
|
|
88
|
-
* cinematic-participating system whose live-gameplay driver `renderOnce()`
|
|
89
|
-
* deliberately bypasses. The motivating case is `bindXStateAnimation`'s
|
|
90
|
-
* `tick` (`animation/xstate-animation-binding.ts`, E2): in live play it
|
|
91
|
-
* rides the fixed-step `'animation'` phase
|
|
92
|
-
* (`ctx.systems.add(SystemPhase.ANIMATION, binding.tick)`), but
|
|
93
|
-
* `renderOnce()` (I2) runs ONLY `preRender`+`render` — the `'animation'`
|
|
94
|
-
* phase, along with every other gameplay phase, is never touched by design
|
|
95
|
-
* (see this module's top doc comment). Without a distinct advance hook, an
|
|
96
|
-
* `AnimationMixer` driven this way would sit frozen for the entire render:
|
|
97
|
-
* nothing would ever call `mixer.update(dt)`. `advanceFrame` (below) is that
|
|
98
|
-
* hook — a small, explicit registry of `FrameAdvancer`s a render-mode page
|
|
99
|
-
* opts into via {@link RenderControlHarnessOptions.frameAdvancers}, invoked
|
|
100
|
-
* in registration order.
|
|
101
|
-
*/
|
|
102
|
-
export type FrameAdvancer = (dt: number) => void;
|
|
103
|
-
/** The `window.__vgaiRender` surface (I2 AC, extended by I8's `advanceFrame`).
|
|
104
|
-
* Every method here is synchronous except the two that genuinely need to
|
|
105
|
-
* wait on the browser (composited render completion, async readiness
|
|
106
|
-
* probes). */
|
|
107
|
-
export interface VgaiRenderHarness {
|
|
108
|
-
/** Evaluate Theatre/registered-GSAP/cinematic-participating evaluators at
|
|
109
|
-
* exact time `t` (seconds) via `clock.seek(t)` — never advances gameplay
|
|
110
|
-
* substeps. Synchronous: the clock's subscribed evaluators run inline,
|
|
111
|
-
* before this call returns. */
|
|
112
|
-
seek(t: number): void;
|
|
113
|
-
/** Exact-frame variant — `clock.seekFrame(n, fps)`, i.e. `start + n/fps`,
|
|
114
|
-
* bit-exact and drift-free across repeated calls. Same no-substep
|
|
115
|
-
* semantics as {@link seek}. */
|
|
116
|
-
seekFrame(n: number, fps: number): void;
|
|
117
|
-
/**
|
|
118
|
-
* I8 render-integration seam: advance every registered
|
|
119
|
-
* {@link FrameAdvancer} (e.g. an XState/`AnimationMixer` binding's `tick`)
|
|
120
|
-
* by exactly `dt` seconds, in registration order. A render-mode capture
|
|
121
|
-
* loop calls this ONCE per OUTPUT frame, with `dt = 1 / fps`, BEFORE
|
|
122
|
-
* `seekFrame`/`renderOnce` for that frame — see
|
|
123
|
-
* `packages/vgai-sdk/src/render/render-cinematic.ts`'s `captureFrames`, which
|
|
124
|
-
* drives exactly this sequence. `advanceFrame` is a genuinely
|
|
125
|
-
* FORWARD-ONLY, INCREMENTAL tick (it has no notion of "time" to seek
|
|
126
|
-
* to — it only knows "advance by `dt` more") — unlike {@link seek}/
|
|
127
|
-
* {@link seekFrame}, which are absolute and idempotent, calling
|
|
128
|
-
* `advanceFrame` twice never undoes or re-derives a prior call, it always
|
|
129
|
-
* accumulates. This composes correctly with I4's default sequence-
|
|
130
|
-
* controlled render (and I8's reference cinematic) specifically BECAUSE
|
|
131
|
-
* that capture loop only ever walks output frames monotonically forward
|
|
132
|
-
* (`n = 0, 1, 2, ...`); it is NOT safe to call from a scrubber/editor
|
|
133
|
-
* preview that seeks backward or re-visits a frame — a caller that needs
|
|
134
|
-
* that (a future `--simulate`/preview seam) must not reuse this hook as-is.
|
|
135
|
-
* A no-op when no advancers are registered (the default), so this method
|
|
136
|
-
* is always present and always safe to call even for a fixture with
|
|
137
|
-
* nothing to advance (e.g. the I0 `render-cinematic` fixture).
|
|
138
|
-
*/
|
|
139
|
-
advanceFrame(dt: number): void;
|
|
140
|
-
/** Runs exactly one `preRender`+`render` phase pass across every
|
|
141
|
-
* host-driven world on the `Game` (z-order is a DOM/canvas-stacking
|
|
142
|
-
* concern already handled by `create-runtime.ts`'s surface stack — this
|
|
143
|
-
* call does not need to reorder anything to composite correctly), then
|
|
144
|
-
* resolves after a double-`requestAnimationFrame` composition fence. */
|
|
145
|
-
renderOnce(): Promise<void>;
|
|
146
|
-
/** Resolves once every declared subsystem has reported in (see
|
|
147
|
-
* {@link ReadinessReport}). */
|
|
148
|
-
ready(): Promise<ReadinessReport>;
|
|
149
|
-
/**
|
|
150
|
-
* I5 `--simulate` seam: advance the FULL fixed-step gameplay frame
|
|
151
|
-
* (`game.runFrame(fixedDt)` — every phase in `PHASE_ORDER`: input,
|
|
152
|
-
* prePhysics, physics, postPhysics, gameLogic, animation, preRender,
|
|
153
|
-
* render) exactly `steps` times, synchronously, in a tight loop. This is
|
|
154
|
-
* what makes physics/gameplay/AI/particles/participating-audio evolve
|
|
155
|
-
* BETWEEN captured output frames under `--simulate` — every real gameplay
|
|
156
|
-
* phase runs, unlike {@link renderOnce} (which runs ONLY `preRender`+
|
|
157
|
-
* `render`, by design, for the I4 sequence-controlled default) or
|
|
158
|
-
* {@link advanceFrame} (which ticks only registered {@link FrameAdvancer}s,
|
|
159
|
-
* never a gameplay phase).
|
|
160
|
-
*
|
|
161
|
-
* `fixedDt` is fixed for the lifetime of this harness (see
|
|
162
|
-
* {@link RenderControlHarnessOptions.simulateFixedDt}, default `1/60` —
|
|
163
|
-
* the same fixed timestep every real host's `createGameLoop` config
|
|
164
|
-
* uses) — callers choose HOW MANY substeps to run per captured frame
|
|
165
|
-
* (`steps`), not the substep's own `dt`, matching the I5 AC's "a fixed
|
|
166
|
-
* integer number of times per output frame" wording exactly.
|
|
167
|
-
*
|
|
168
|
-
* A capture loop that wants BOTH a warmup period (I5 AC: "simulation
|
|
169
|
-
* state can warm up before the capture range") and per-frame substeps
|
|
170
|
-
* calls this twice: once with the warmup step count before frame 0, then
|
|
171
|
-
* once per captured frame with the per-frame step count — there is no
|
|
172
|
-
* separate "warmup" method, because warmup is just simulateSubsteps called
|
|
173
|
-
* before the capture loop starts (see `render-cinematic.ts`'s
|
|
174
|
-
* `captureFrames`, which drives exactly this sequence for `--simulate`
|
|
175
|
-
* requests).
|
|
176
|
-
*/
|
|
177
|
-
simulateSubsteps(steps: number): void;
|
|
178
|
-
/**
|
|
179
|
-
* I5 AC 5 ("the render report names every subsystem excluded from
|
|
180
|
-
* deterministic participation"): every subsystem NOT participating in
|
|
181
|
-
* deterministic capture, computed fresh on every call from two sources —
|
|
182
|
-
* (1) `RenderControlHarnessOptions.excludedFromDeterminism`, a static,
|
|
183
|
-
* page-declared list (e.g. "live Colyseus networking", "non-seeded ambient
|
|
184
|
-
* audio") this fixture/game names about itself, and (2) any world this
|
|
185
|
-
* seam itself could not frame-gate (a `drivesOwnLoop` world, or a
|
|
186
|
-
* host-driven world with no `WorldFrameHooks` — the SAME two conditions
|
|
187
|
-
* {@link renderOnce}'s `renderableWorlds` skips, described here as policy
|
|
188
|
-
* rather than merely warned about once to the console). Declared entries
|
|
189
|
-
* come first, in declaration order; world-exclusion entries follow, in
|
|
190
|
-
* `game.roots` declaration order.
|
|
191
|
-
*/
|
|
192
|
-
excludedFromDeterminism(): string[];
|
|
193
|
-
/**
|
|
194
|
-
* I7 fold-in (I5 nit): the ACTUAL fixed substep `dt` (seconds) this
|
|
195
|
-
* harness passes to every `game.runFrame(fixedDt)` call inside
|
|
196
|
-
* {@link simulateSubsteps} — i.e. `RenderControlHarnessOptions.simulateFixedDt`,
|
|
197
|
-
* resolved with its own `1/60` default already applied. Exists so the
|
|
198
|
-
* render pipeline (`render-cinematic.ts`'s `RenderManifestSimulate
|
|
199
|
-
* .fixedTimestep`) can report the REAL value a fixture is using instead of
|
|
200
|
-
* assuming every fixture matches the harness's own default — a fixture
|
|
201
|
-
* that configures a different `simulateFixedDt` (a different Rapier/
|
|
202
|
-
* physics substep) now shows up correctly in the render manifest rather
|
|
203
|
-
* than a silently wrong hardcoded `1/60`.
|
|
204
|
-
*/
|
|
205
|
-
simulateFixedDt(): number;
|
|
206
|
-
}
|
|
207
|
-
export interface RenderControlHarnessOptions {
|
|
208
|
-
/**
|
|
209
|
-
* `GameInternal` (not just the game-facing `Game`) — this harness is
|
|
210
|
-
* itself a host (the render/capture driver), and I5's
|
|
211
|
-
* {@link VgaiRenderHarness.simulateSubsteps} needs the host-only
|
|
212
|
-
* `runFrame` surface (`runtime/game.ts`'s `GameInternal.runFrame` doc
|
|
213
|
-
* comment: "the host loop ... and `GameSession.step()` are the only
|
|
214
|
-
* callers"). Every real call site already holds a `GameInternal` (the
|
|
215
|
-
* direct return of `createGame(...)`), so this is not a new construction
|
|
216
|
-
* requirement, just a narrower declared type than before I5.
|
|
217
|
-
*/
|
|
218
|
-
readonly game: GameInternal;
|
|
219
|
-
readonly clock: SeekableClock;
|
|
220
|
-
readonly readiness?: RenderReadinessHooks;
|
|
221
|
-
/** Where to publish the harness. Defaults to the real `window` — override
|
|
222
|
-
* in a unit test to avoid touching the global object. */
|
|
223
|
-
readonly target?: Record<string, unknown>;
|
|
224
|
-
/** Where to read `?vgai-render=1` from. Defaults to `window.location`. */
|
|
225
|
-
readonly location?: {
|
|
226
|
-
readonly search: string;
|
|
227
|
-
};
|
|
228
|
-
/** I8 render-integration seam — see {@link VgaiRenderHarness.advanceFrame}.
|
|
229
|
-
* Zero or more `FrameAdvancer`s invoked, in array order, on every
|
|
230
|
-
* `harness.advanceFrame(dt)` call. Default `[]` (no-op), which is exactly
|
|
231
|
-
* what a fixture with nothing gameplay-phase-driven (e.g. I0's fixture)
|
|
232
|
-
* needs — `advanceFrame` is still present on the harness, it just has
|
|
233
|
-
* nothing to do. */
|
|
234
|
-
readonly frameAdvancers?: readonly FrameAdvancer[];
|
|
235
|
-
/**
|
|
236
|
-
* I5 `--simulate` seam: the fixed substep `dt` (seconds)
|
|
237
|
-
* {@link VgaiRenderHarness.simulateSubsteps} passes to every
|
|
238
|
-
* `game.runFrame(fixedDt)` call. Default `1/60` — the same fixed timestep
|
|
239
|
-
* every real host's `createGameLoop` config uses (`create-runtime.ts`), so
|
|
240
|
-
* a `--simulate` fixture's Rapier world (whose own `integrationParameters.dt`
|
|
241
|
-
* defaults to `1/60`) stays in lockstep with the gameplay substep unless a
|
|
242
|
-
* fixture deliberately configures both to a different, still-matching,
|
|
243
|
-
* value.
|
|
244
|
-
*/
|
|
245
|
-
readonly simulateFixedDt?: number;
|
|
246
|
-
/**
|
|
247
|
-
* I5 AC 5 — see {@link VgaiRenderHarness.excludedFromDeterminism}. A
|
|
248
|
-
* static, page-declared list of subsystems this fixture/game has that do
|
|
249
|
-
* NOT participate in deterministic capture (e.g. live networking,
|
|
250
|
-
* non-seeded ambient audio) — named here as an explicit, reviewable
|
|
251
|
-
* policy rather than silently dropped. Default `[]` (nothing to declare —
|
|
252
|
-
* correct for a fixture with no such subsystem).
|
|
253
|
-
*/
|
|
254
|
-
readonly excludedFromDeterminism?: readonly string[];
|
|
255
|
-
}
|
|
256
|
-
/** Shared by {@link installRenderControlHarness} and any caller that wants
|
|
257
|
-
* to check the opt-in flag before doing render-mode-only setup work (e.g.
|
|
258
|
-
* `render-seed.ts`'s own gate uses the same query param name). */
|
|
259
|
-
export declare function isRenderModeRequested(location: {
|
|
260
|
-
readonly search: string;
|
|
261
|
-
}): boolean;
|
|
262
|
-
/**
|
|
263
|
-
* Build (and, when render mode is actually requested, publish) the
|
|
264
|
-
* `window.__vgaiRender` harness. AC 4 — production protection — lives HERE,
|
|
265
|
-
* not just at the call site: even if a host application calls this
|
|
266
|
-
* unconditionally on every boot, the harness is only ever constructed *and*
|
|
267
|
-
* attached to `target` when `isRenderModeRequested(location)` is true;
|
|
268
|
-
* otherwise this is a no-op that returns `undefined`. A normal production
|
|
269
|
-
* gameplay page therefore never gets `window.__vgaiRender` no matter how
|
|
270
|
-
* this function is wired into its entry point.
|
|
271
|
-
*/
|
|
272
|
-
export declare function installRenderControlHarness(opts: RenderControlHarnessOptions): VgaiRenderHarness | undefined;
|
|
273
|
-
/**
|
|
274
|
-
* Defensive assertion for the I2 AC "Pixi roots are pinned to the WebGL
|
|
275
|
-
* renderer (not WebGPU) in render mode". In THIS engine that invariant
|
|
276
|
-
* already holds unconditionally — `world2d/pixi-surface.ts`'s
|
|
277
|
-
* `createPixiSurface` hardcodes `preference: 'webgl'` on every
|
|
278
|
-
* `Application.init()` call it makes, and `setup/setup-renderer.ts` never
|
|
279
|
-
* constructs a `WebGPURenderer` for threejs roots either — so there is no
|
|
280
|
-
* live WebGPU code path for a first-party render-mode page to disable.
|
|
281
|
-
* This helper exists for a render-mode installer that mounts a CUSTOM/
|
|
282
|
-
* foreign pixi adapter (`create-runtime.ts`'s `{ module }` pixi path) this
|
|
283
|
-
* engine did not construct itself, to assert the invariant against the
|
|
284
|
-
* live mounted renderer rather than merely trusting it. Duck-typed against
|
|
285
|
-
* pixi.js v8's numeric `RendererType` (`WEBGL = 1`, `WEBGPU = 2`,
|
|
286
|
-
* `CANVAS = 4`) so this file never value-imports `pixi.js` (the same
|
|
287
|
-
* type-only-pixi rule `runtime/game.ts`/`create-runtime.ts` document for
|
|
288
|
-
* themselves).
|
|
289
|
-
*/
|
|
290
|
-
export declare function assertPixiWorldIsWebGL(rendererType: unknown, worldId: string): void;
|
|
291
|
-
//# sourceMappingURL=render-control.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render-control.d.ts","sourceRoot":"","sources":["../../src/runtime/render-control.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,OAAO,KAAK,EAAQ,YAAY,EAAmB,MAAM,QAAQ,CAAC;AAGlE;;;;uEAIuE;AACvE,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,gBAAgB,GAAG,OAAO,CAAC;AAEnE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;iDAEiD;AACjD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;CAChC;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAChC,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACjC,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACjC,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC9B,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAChC;AAED;;;oEAGoE;AACpE,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;AAEjD;;;eAGe;AACf,MAAM,WAAW,iBAAiB;IAChC;;;oCAGgC;IAChC,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;qCAEiC;IACjC,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;;;6EAIyE;IACzE,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B;oCACgC;IAChC,KAAK,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;IAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC;;;;;;;;;;;;;OAaG;IACH,uBAAuB,IAAI,MAAM,EAAE,CAAC;IACpC;;;;;;;;;;;OAWG;IACH,eAAe,IAAI,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,2BAA2B;IAC1C;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,oBAAoB,CAAC;IAC1C;8DAC0D;IAC1D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD;;;;;yBAKqB;IACrB,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;IACnD;;;;;;;;;OASG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC;;;;;;;OAOG;IACH,QAAQ,CAAC,uBAAuB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACtD;AAED;;mEAEmE;AACnE,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAEpF;AA0KD;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,2BAA2B,GAChC,iBAAiB,GAAG,SAAS,CAyC/B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CASnF"}
|