@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
|
@@ -228,6 +228,14 @@ export function createR3FAdapter(options: CreateR3FAdapterOptions): GameAdapter
|
|
|
228
228
|
// `update(dt)` tick, so no component ever observes them missing.
|
|
229
229
|
runtime.setSceneCamera(state.scene, state.camera);
|
|
230
230
|
|
|
231
|
+
// Match the classic scene-loader readiness contract: a mounted world is
|
|
232
|
+
// not ready until every scene-authored component has completed init().
|
|
233
|
+
// Deterministic warm-ups may advance many fixed substeps synchronously;
|
|
234
|
+
// an init deferred to the first frame cannot make progress until after
|
|
235
|
+
// that entire warm-up has already ended. `<Behavior>` attaches during
|
|
236
|
+
// the commit layout phase, so initAll() sees the complete component set.
|
|
237
|
+
await components.initAll();
|
|
238
|
+
|
|
231
239
|
// The engine drives every `useFrame` through the mounted world's
|
|
232
240
|
// `update(dt)` hook — NOT `host.loop.onUpdate`. The distinction is the
|
|
233
241
|
// whole pause story: `runFrameImpl` (`runtime/game.ts`) calls
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `AdapterSurface` — the kinds of render surface a world can be (T7.1/T7.3/T6.2).
|
|
3
|
-
*
|
|
4
|
-
* Moved here (T7.5, `docs/BACKBONE-TASKS.md`'s D6 row) from `runtime/game.ts`
|
|
5
|
-
* so `adapter/game-adapter.ts`'s kind-tagged `MountedWorld` types can name it
|
|
6
|
-
* without a value-level import cycle (`runtime/game.ts` type-imports from
|
|
7
|
-
* `adapter/game-adapter.ts` already). This is a leaf module — it imports
|
|
8
|
-
* nothing — so anything may import it with zero risk of a cycle.
|
|
9
|
-
* `runtime/game.ts` re-exports this SAME type (`export type { AdapterSurface }`),
|
|
10
|
-
* so no existing `import type { AdapterSurface } from '../runtime/game'` call site
|
|
11
|
-
* needed to change.
|
|
12
|
-
*/
|
|
13
|
-
export type AdapterSurface = 'threejs' | 'pixijs' | 'react';
|
|
14
|
-
/**
|
|
15
|
-
* Exhaustiveness guard for `AdapterSurface` dispatch (v4 architecture-review
|
|
16
|
-
* §7.4-2: a hypothetical 4th kind must fail to COMPILE at every kind-dispatch
|
|
17
|
-
* site, not silently contribute nothing or silently default to an existing
|
|
18
|
-
* kind). Lives here — colocated with the kind vocabulary itself, not in a
|
|
19
|
-
* generic util module — so the three call sites that need it
|
|
20
|
-
* (`runtime/create-runtime.ts`'s mount loop, `editor/adapter-resolver.ts`'s
|
|
21
|
-
* `resolveAllWorlds`, `editor/play-mode.ts`'s `installMultiWorldAuthoring`)
|
|
22
|
-
* import it from the same leaf module that defines `AdapterSurface`, keeping the
|
|
23
|
-
* type and its guard from drifting apart. The `never` parameter is the
|
|
24
|
-
* compile-time half of the guard (TS refuses to call this with anything the
|
|
25
|
-
* compiler hasn't already narrowed to zero remaining variants); the thrown
|
|
26
|
-
* Error is the runtime half, in case a value's static type lied (e.g. data
|
|
27
|
-
* crossing a JSON boundary).
|
|
28
|
-
*/
|
|
29
|
-
export declare function assertNever(value: never, context?: string): never;
|
|
30
|
-
//# sourceMappingURL=adapter-surface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-surface.d.ts","sourceRoot":"","sources":["../../src/adapter/adapter-surface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE5D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAIjE"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Exhaustiveness guard for `AdapterSurface` dispatch (v4 architecture-review
|
|
3
|
-
* §7.4-2: a hypothetical 4th kind must fail to COMPILE at every kind-dispatch
|
|
4
|
-
* site, not silently contribute nothing or silently default to an existing
|
|
5
|
-
* kind). Lives here — colocated with the kind vocabulary itself, not in a
|
|
6
|
-
* generic util module — so the three call sites that need it
|
|
7
|
-
* (`runtime/create-runtime.ts`'s mount loop, `editor/adapter-resolver.ts`'s
|
|
8
|
-
* `resolveAllWorlds`, `editor/play-mode.ts`'s `installMultiWorldAuthoring`)
|
|
9
|
-
* import it from the same leaf module that defines `AdapterSurface`, keeping the
|
|
10
|
-
* type and its guard from drifting apart. The `never` parameter is the
|
|
11
|
-
* compile-time half of the guard (TS refuses to call this with anything the
|
|
12
|
-
* compiler hasn't already narrowed to zero remaining variants); the thrown
|
|
13
|
-
* Error is the runtime half, in case a value's static type lied (e.g. data
|
|
14
|
-
* crossing a JSON boundary).
|
|
15
|
-
*/
|
|
16
|
-
export function assertNever(value, context) {
|
|
17
|
-
throw new Error(`Unreachable${context ? ` ${context}` : ''}: unexpected value ${JSON.stringify(value)}`);
|
|
18
|
-
}
|
|
@@ -1,461 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AuthoringAdapter — the editor's authoring contract. The editor talks to THIS,
|
|
3
|
-
* keyed by opaque string node ids, instead of to a concrete document format.
|
|
4
|
-
*
|
|
5
|
-
* `.vscn` / `SceneEntity` is the private model of ONE implementer
|
|
6
|
-
* (`VgaiSceneAuthoringAdapter`); an ingested game's adapter implements the same
|
|
7
|
-
* providers directly over its live `Object3D` tree. The editor sees only the
|
|
8
|
-
* interface and the advertised `capabilities` — it never branches on which
|
|
9
|
-
* implementer it is talking to.
|
|
10
|
-
*
|
|
11
|
-
* The interface lives in the engine (not the editor) so `MountedGame.authoring`
|
|
12
|
-
* can reference it without the engine depending on the editor; implementers live
|
|
13
|
-
* in `packages/editor/src/authoring/`.
|
|
14
|
-
*
|
|
15
|
-
* **Reserved inspector paths convention:** the property paths `name`, `visible`,
|
|
16
|
-
* and `locked` are reserved — an adapter that supports them exposes them through
|
|
17
|
-
* the ordinary `InspectorProvider.get`/`set` (no separate provider). The shell
|
|
18
|
-
* renders the hierarchy panel's rename field, eye (visibility) toggle, and lock
|
|
19
|
-
* toggle against these three paths, generically, for any adapter that reports
|
|
20
|
-
* them via `InspectorProvider.properties`.
|
|
21
|
-
*/
|
|
22
|
-
import type * as THREE from 'three';
|
|
23
|
-
import type { SceneEntity } from '../scene/scene-types';
|
|
24
|
-
import type { Transform, TransformOwner } from './transform';
|
|
25
|
-
/** Booleans the editor UI gates affordances on (hide what an adapter can't do). */
|
|
26
|
-
export interface AuthoringCapabilities {
|
|
27
|
-
transform: boolean;
|
|
28
|
-
material: boolean;
|
|
29
|
-
inspectorFields: boolean;
|
|
30
|
-
create: boolean;
|
|
31
|
-
delete: boolean;
|
|
32
|
-
reparent: boolean;
|
|
33
|
-
persist: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* UI layout authoring (anchors/offsets/pivot/flex) — distinct from 3D
|
|
36
|
-
* `transform`. Optional so existing 3D adapters need not declare it. A UI
|
|
37
|
-
* adapter sets this true and implements {@link LayoutProvider}; the 3D gizmo /
|
|
38
|
-
* TransformProvider are NOT the UI manipulation path (spec K7).
|
|
39
|
-
*/
|
|
40
|
-
layout?: boolean;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* The adapter's own answer to "what is truth behind these rows, and how
|
|
44
|
-
* writable is it" (spec 29 §5, docs/unified-world-editor/
|
|
45
|
-
* 29-hierarchy-philosophy.md). Provenance never varies WITHIN one adapter's
|
|
46
|
-
* rows — it is a property of the world boundary — so it is declared ONCE per
|
|
47
|
-
* adapter and rendered at the SEAM (the composite's `world:<id>` group row,
|
|
48
|
-
* or the panel header for a bare adapter), never per row. Only the adapter
|
|
49
|
-
* knows its truth: the shell must read this field, never guess from adapter
|
|
50
|
-
* identity (rule zero). Machine-readable operation gates stay in
|
|
51
|
-
* {@link AuthoringCapabilities}/provider presence — this type carries the
|
|
52
|
-
* HUMAN explanation those gates can point at when an affordance is present
|
|
53
|
-
* but unavailable.
|
|
54
|
-
*/
|
|
55
|
-
export interface AuthoringProvenance {
|
|
56
|
-
/**
|
|
57
|
-
* What the rows project:
|
|
58
|
-
* - `document` — an authored data file the editor owns (e.g. a scene file);
|
|
59
|
-
* - `source-code` — the game's own source is the document (e.g. JSX);
|
|
60
|
-
* - `foreign` — a live tree the editor does not own (an unmodified external
|
|
61
|
-
* game, or any world edited only through an overlay); edits go to the
|
|
62
|
-
* overlay, never the source;
|
|
63
|
-
* - `live` — a running game adopted at play time; edits are not persisted;
|
|
64
|
-
* - `boundary` — a declared world with no live editing surface here.
|
|
65
|
-
*/
|
|
66
|
-
source: 'document' | 'source-code' | 'foreign' | 'live' | 'boundary';
|
|
67
|
-
/** Short badge text the shell shows verbatim at the seam (e.g. "scene",
|
|
68
|
-
* "jsx", "overlay", "read-only", "live"). */
|
|
69
|
-
label: string;
|
|
70
|
-
/** One sentence explaining the truth/writability — shown as the seam
|
|
71
|
-
* badge's tooltip and as the reason on disabled affordances. */
|
|
72
|
-
detail: string;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Semantic place a node occupies in the universal authoring hierarchy.
|
|
76
|
-
*
|
|
77
|
-
* `kind` below remains the adapter's native kind (`mesh`, `button`,
|
|
78
|
-
* `pixi-container`, ...). `role` says what the row MEANS to the editor shell,
|
|
79
|
-
* so presentation and interaction never have to infer semantics from an id,
|
|
80
|
-
* label, or substrate-specific kind string.
|
|
81
|
-
*/
|
|
82
|
-
export type EditorNodeRole = 'folder' | 'root' | 'document' | 'story' | 'component' | 'element' | 'entity' | 'boundary';
|
|
83
|
-
/** A node in the authoring hierarchy — format-neutral (not a `SceneEntity`). */
|
|
84
|
-
export interface EditorNode {
|
|
85
|
-
/** STABLE id — survives reload (see ingest structural-path ids). */
|
|
86
|
-
id: string;
|
|
87
|
-
label: string;
|
|
88
|
-
/** Adapter-declared semantic role. Optional for third-party/older adapters;
|
|
89
|
-
* the shell falls back to the native `kind` only for icon selection. */
|
|
90
|
-
role?: EditorNodeRole;
|
|
91
|
-
/** Optional source-owned context kept visually subordinate to `label`, such
|
|
92
|
-
* as `<header>` beneath a React component name or a document's file path. */
|
|
93
|
-
secondaryLabel?: string;
|
|
94
|
-
kind: 'mesh' | 'light' | 'camera' | 'group' | 'object' | (string & {});
|
|
95
|
-
parentId: string | null;
|
|
96
|
-
childIds: string[];
|
|
97
|
-
flags: {
|
|
98
|
-
runtimeOnly?: boolean;
|
|
99
|
-
locked?: boolean;
|
|
100
|
-
transformOwner?: TransformOwner;
|
|
101
|
-
/** D8 — member of a RootGroup, not the active one; children may be unloaded. */
|
|
102
|
-
inactiveRoot?: boolean;
|
|
103
|
-
/** Design state currently projected into the live authoring surface. */
|
|
104
|
-
active?: boolean;
|
|
105
|
-
/** The adapter resolved this boundary, but it is not editable here. */
|
|
106
|
-
readOnly?: boolean;
|
|
107
|
-
/** The adapter could not resolve the declared authoring boundary. */
|
|
108
|
-
error?: boolean;
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
export interface PropertyDescriptor {
|
|
112
|
-
path: string;
|
|
113
|
-
label: string;
|
|
114
|
-
type: 'string' | 'number' | 'boolean' | 'vec3' | 'color' | 'enum' | 'asset' | 'json';
|
|
115
|
-
readonly?: boolean;
|
|
116
|
-
options?: unknown[];
|
|
117
|
-
/**
|
|
118
|
-
* Optional domain-shaped grouping (T3.4 slice 2, docs/ADAPTER-AUTHORING-
|
|
119
|
-
* DESIGN.md §1.E): properties sharing the same `group` label render
|
|
120
|
-
* together under a titled sub-section in the generic inspector, instead of
|
|
121
|
-
* the flat property grid. Backward-compatible — omitted (or two
|
|
122
|
-
* descriptors with different/no `group`) renders exactly as before this
|
|
123
|
-
* field existed. This is the ONLY authoring-richness addition v1 makes;
|
|
124
|
-
* there is no schema and no new PropertyDescriptor `type` — a custom
|
|
125
|
-
* adapter reports its own domain concepts (health/score/an enum, …) through
|
|
126
|
-
* the SAME provider, merely labeled into a named group.
|
|
127
|
-
*/
|
|
128
|
-
group?: string;
|
|
129
|
-
}
|
|
130
|
-
export interface HierarchyProvider {
|
|
131
|
-
roots(): EditorNode[];
|
|
132
|
-
node(id: string): EditorNode | null;
|
|
133
|
-
/** The live object for raycast/gizmo binding (null for non-object nodes). */
|
|
134
|
-
object3D(id: string): THREE.Object3D | null;
|
|
135
|
-
idForObject3D(o: THREE.Object3D): string | null;
|
|
136
|
-
}
|
|
137
|
-
export interface SelectionProvider {
|
|
138
|
-
get(): string[];
|
|
139
|
-
set(ids: string[]): void;
|
|
140
|
-
}
|
|
141
|
-
export interface TransformProvider {
|
|
142
|
-
get(id: string): Transform;
|
|
143
|
-
owner(id: string): TransformOwner;
|
|
144
|
-
/** Pause whatever controller fights the gizmo (physics/script) for editing. */
|
|
145
|
-
beginEdit(id: string): void;
|
|
146
|
-
apply(id: string, t: Transform): void;
|
|
147
|
-
endEdit(id: string): void;
|
|
148
|
-
}
|
|
149
|
-
export interface InspectorProvider {
|
|
150
|
-
/** Schema-driven — NOT fixed to `SceneEntity`. */
|
|
151
|
-
properties(id: string): PropertyDescriptor[];
|
|
152
|
-
get(id: string, path: string): unknown;
|
|
153
|
-
set(id: string, path: string, value: unknown): void;
|
|
154
|
-
/**
|
|
155
|
-
* Optional — REMOVE a property's authored override entirely (not "set to a
|
|
156
|
-
* value"), letting whatever governs it in its absence take over. The one
|
|
157
|
-
* concrete need today: a longhand CSS override (`style.borderTopLeftRadius`)
|
|
158
|
-
* that a uniform edit of its shorthand (`style.borderRadius`) must clear so
|
|
159
|
-
* the shorthand actually wins, instead of leaving a stale longhand that
|
|
160
|
-
* silently overrides it on reload (spec 27 §5 C2, U2). Adapters with no
|
|
161
|
-
* removable-override concept simply omit it — callers optional-chain.
|
|
162
|
-
*/
|
|
163
|
-
remove?(id: string, path: string): void;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* UI layout authoring (K7) — anchors/offsets/pivot/flex props on a UI node. This
|
|
167
|
-
* is the manipulation path for the DOM-overlay UI editor (handles, anchor presets,
|
|
168
|
-
* flex inspector) and is deliberately SEPARATE from {@link TransformProvider}
|
|
169
|
-
* (which is 3D position/quaternion/scale and cannot express flex/anchor layout).
|
|
170
|
-
* The layout shape is format-neutral (a plain object the UI adapter understands).
|
|
171
|
-
*/
|
|
172
|
-
export interface LayoutProvider {
|
|
173
|
-
/** The node's current layout object (anchors/offsets/pivot/flex), or null. */
|
|
174
|
-
get(id: string): Record<string, unknown> | null;
|
|
175
|
-
/** Pause whatever drives layout (animation) before a gesture, if needed. */
|
|
176
|
-
beginEdit(id: string): void;
|
|
177
|
-
/** Apply a (partial) layout patch — merged onto the node's layout. */
|
|
178
|
-
apply(id: string, layoutPatch: Record<string, unknown>): void;
|
|
179
|
-
/** Commit the gesture (one undo step). */
|
|
180
|
-
endEdit(id: string): void;
|
|
181
|
-
}
|
|
182
|
-
export interface StructureProvider {
|
|
183
|
-
create(kind: string, parentId?: string): string;
|
|
184
|
-
/**
|
|
185
|
-
* Remove `id`. May optionally return an awaitable (`Promise<void>`) when the
|
|
186
|
-
* underlying write is asynchronous (e.g. a react-world source-file edit) —
|
|
187
|
-
* `deleteSelection` (`editor-hotkeys.ts`) awaits it per id so a same-file
|
|
188
|
-
* multi-delete's writes land strictly one at a time (see that function's own
|
|
189
|
-
* doc comment for why serialization + deletion order together are what make
|
|
190
|
-
* a per-id loop sound for an adapter whose OID index isn't reindexed between
|
|
191
|
-
* writes). An adapter with a synchronous/in-memory remove (e.g.
|
|
192
|
-
* `UIAuthoringAdapter`) returns `void` — `await`ing it is a harmless no-op.
|
|
193
|
-
*/
|
|
194
|
-
remove(id: string): void | Promise<void>;
|
|
195
|
-
duplicate(id: string): string;
|
|
196
|
-
reparent(id: string, newParentId: string | null): void;
|
|
197
|
-
/** Reorder `id` to sit immediately before `beforeSiblingId` among its siblings
|
|
198
|
-
* (`null` = move to the end). Absent ⇒ the shell has no sibling-reorder UI
|
|
199
|
-
* for this adapter. */
|
|
200
|
-
reorder?(id: string, beforeSiblingId: string | null): void;
|
|
201
|
-
/**
|
|
202
|
-
* The kinds `create` accepts for a given parent (`null` parentId = a new
|
|
203
|
-
* root), each with a display label — drives the shell's creation palette.
|
|
204
|
-
* Absent ⇒ the palette shows nothing for this adapter, even though `create`
|
|
205
|
-
* itself may still work when called directly (e.g. programmatically, or by
|
|
206
|
-
* an adapter-specific affordance outside the generic palette).
|
|
207
|
-
*/
|
|
208
|
-
creatableKinds?(parentId: string | null): {
|
|
209
|
-
kind: string;
|
|
210
|
-
label: string;
|
|
211
|
-
}[];
|
|
212
|
-
/** D3 (spec 27 §6) — wrap `id` in a new container element (default tag
|
|
213
|
-
* adapter-chosen, e.g. a `div`), re-parenting `id` as that container's sole
|
|
214
|
-
* child. Absent ⇒ the shell's context menu shows no Wrap item for this
|
|
215
|
-
* adapter. */
|
|
216
|
-
wrap?(id: string, wrapperTag?: string): void;
|
|
217
|
-
/** D3 (spec 27 §6) — replace `id` with its own children (the inverse of
|
|
218
|
-
* `wrap`). Absent ⇒ the shell's context menu shows no Unwrap item for this
|
|
219
|
-
* adapter. */
|
|
220
|
-
unwrap?(id: string): void;
|
|
221
|
-
/**
|
|
222
|
-
* D4.R2 (spec27 §6 D4 reopen) — remove every id in `ids` as ONE undoable
|
|
223
|
-
* op (a single Ctrl+Z restores the whole batch), instead of the caller
|
|
224
|
-
* looping `remove(id)` per id (which — one `remove` call = one undo push
|
|
225
|
-
* per adapter, by design — produces N separate undo entries: Ctrl+Z then
|
|
226
|
-
* restores them one at a time, asymmetric with the first-party adapter's
|
|
227
|
-
* own single batched multi-delete undo). Absent ⇒ the shell falls back to
|
|
228
|
-
* the per-id `remove` loop (today's N-entry behavior, unchanged) — an
|
|
229
|
-
* honest degrade, not a silent behavior change, for any adapter that
|
|
230
|
-
* hasn't implemented batching. May optionally return an awaitable
|
|
231
|
-
* (`Promise<void>`), same widening `remove` documents above and for the
|
|
232
|
-
* same reason (delete-order-residual fix): `deleteSelection`
|
|
233
|
-
* (`editor-hotkeys.ts`) awaits it so the caller can rely on the whole
|
|
234
|
-
* batch's write having landed before it returns. A synchronous/in-memory
|
|
235
|
-
* implementation (e.g. `UIAuthoringAdapter`'s) returns `void` — awaiting it
|
|
236
|
-
* is a harmless no-op.
|
|
237
|
-
*/
|
|
238
|
-
removeMany?(ids: readonly string[]): void | Promise<void>;
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* PersistenceProvider — whether and where an adapter's edits persist (design:
|
|
242
|
-
* `docs/PERSISTENCE-PROVIDER-DESIGN.md` §2). The ACTIVE adapter's provider is the
|
|
243
|
-
* ONE place this is decided — the host (editor) never hard-codes a destination or
|
|
244
|
-
* guards on session flags; it asks the provider.
|
|
245
|
-
*/
|
|
246
|
-
export interface PersistenceProvider {
|
|
247
|
-
isDirty(): boolean;
|
|
248
|
-
/** Save to the adapter's OWN source of truth (.vscn / overlay file / …). */
|
|
249
|
-
save(): Promise<void>;
|
|
250
|
-
serialize(): unknown;
|
|
251
|
-
/** Migration aid (first-party direction): pull a subtree into `.vscn` entities. */
|
|
252
|
-
captureToVscn?(ids: string[]): SceneEntity[];
|
|
253
|
-
/**
|
|
254
|
-
* Human/agent-readable destination this provider persists to — e.g.
|
|
255
|
-
* `"scenes/main.vscn.json"`, `".vgai/overlays/fps.json"`, or `"ephemeral
|
|
256
|
-
* (discarded on stop)"`. Drives the save-status UI and makes routing
|
|
257
|
-
* inspectable (design §2). Implementers whose destination can change during
|
|
258
|
-
* the session (e.g. the first-party provider tracks the loaded `.vscn` path)
|
|
259
|
-
* should expose this as a live getter rather than a value captured once.
|
|
260
|
-
*/
|
|
261
|
-
readonly destination: string;
|
|
262
|
-
/**
|
|
263
|
-
* The reload contract (design §5): apply an external change to this
|
|
264
|
-
* provider's persisted artifact into the RUNNING session (e.g. a file-watcher
|
|
265
|
-
* update to the `.vscn` or the overlay). Absent ⇒ the host must remount to
|
|
266
|
-
* pick up external changes (the honest floor). Implemented (T3.2 slice 3) by
|
|
267
|
-
* the first-party provider (`applyExternalUpdate`) and the ingest overlay
|
|
268
|
-
* provider (`applyOverlay`); absent (correctly) on the ephemeral provider.
|
|
269
|
-
*
|
|
270
|
-
* `rawContent`, when the host has it (the file-watcher SSE payload carries the
|
|
271
|
-
* artifact's exact bytes), is an OPTIONAL second parameter enabling own-echo
|
|
272
|
-
* detection — an event that is exactly what this provider itself last wrote is
|
|
273
|
-
* its own save reflected back, and should be skipped even outside the normal
|
|
274
|
-
* debounce window (see `EditorStore.applyExternalUpdate`'s doc comment). This
|
|
275
|
-
* stays optional/provider-specific — only the first-party provider currently
|
|
276
|
-
* uses it — so other implementers can ignore the parameter entirely.
|
|
277
|
-
*/
|
|
278
|
-
applyExternal?(content: unknown, rawContent?: string): void;
|
|
279
|
-
}
|
|
280
|
-
/** D8 — mutually-exclusive root groups (radio roots): e.g. a "Scenes" group whose
|
|
281
|
-
* members are the game's scene roots, only one of which is loaded/active at a
|
|
282
|
-
* time (unlike ordinary sibling roots, which all coexist). */
|
|
283
|
-
export interface RootGroup {
|
|
284
|
-
id: string;
|
|
285
|
-
label: string;
|
|
286
|
-
memberRootIds: string[];
|
|
287
|
-
activeRootId: string | null;
|
|
288
|
-
}
|
|
289
|
-
export interface RootGroupsProvider {
|
|
290
|
-
groups(): RootGroup[];
|
|
291
|
-
activate(groupId: string, rootId: string): Promise<void> | void;
|
|
292
|
-
}
|
|
293
|
-
/** D8 — data-file → root mapping ("opening a file" = activating its root). */
|
|
294
|
-
export interface FileMapProvider {
|
|
295
|
-
/** project-relative path → node id this adapter maps it to, else null. */
|
|
296
|
-
rootForFile(path: string): string | null;
|
|
297
|
-
}
|
|
298
|
-
/** D12 — per-layer viewport picking. Coordinates are client (browser) px. */
|
|
299
|
-
export interface PickProvider {
|
|
300
|
-
pick(clientX: number, clientY: number): string | null;
|
|
301
|
-
}
|
|
302
|
-
/** D4 — storybook stories. */
|
|
303
|
-
export interface StoryRef {
|
|
304
|
-
id: string;
|
|
305
|
-
label: string;
|
|
306
|
-
}
|
|
307
|
-
export interface StoriesProvider {
|
|
308
|
-
storiesFor(nodeId: string): StoryRef[];
|
|
309
|
-
active(nodeId: string): string | null;
|
|
310
|
-
apply(nodeId: string, storyId: string | null): void;
|
|
311
|
-
/** Render ONLY this node against the story (storybook canvas); null exits. */
|
|
312
|
-
isolate?(nodeId: string | null, storyId?: string): void;
|
|
313
|
-
}
|
|
314
|
-
/** D6 (S-C) — GameComponent management; config editing stays on InspectorProvider. */
|
|
315
|
-
export interface ComponentsProvider {
|
|
316
|
-
available(nodeId: string): string[];
|
|
317
|
-
list(nodeId: string): {
|
|
318
|
-
type: string;
|
|
319
|
-
}[];
|
|
320
|
-
add(nodeId: string, type: string): void;
|
|
321
|
-
remove(nodeId: string, type: string): void;
|
|
322
|
-
/**
|
|
323
|
-
* OPTIONAL read accessor (W3.1, docs/DATA-TOOLS-DESIGN.md §3.3): the raw
|
|
324
|
-
* authored config record for one attached component (`list()` names the
|
|
325
|
-
* types; this reads one type's per-entity data), or `null` when the entity
|
|
326
|
-
* or component doesn't exist. Returns a shallow copy — callers must write
|
|
327
|
-
* through `InspectorProvider.set('components.<Type>.<field>', v)`, never by
|
|
328
|
-
* mutating this. Absent ⇒ config is not readable through this provider
|
|
329
|
-
* (tools degrade to `config: null`).
|
|
330
|
-
*/
|
|
331
|
-
config?(nodeId: string, type: string): Record<string, unknown> | null;
|
|
332
|
-
}
|
|
333
|
-
/** Asset drop (hierarchy + viewport). */
|
|
334
|
-
export interface AssetDropProvider {
|
|
335
|
-
accepts(nodeId: string, assetPath: string): boolean;
|
|
336
|
-
drop(nodeId: string, assetPath: string): void;
|
|
337
|
-
}
|
|
338
|
-
/** Plain-object rect shape shared by {@link RectProvider} — the same fields a real
|
|
339
|
-
* `DOMRect` carries (a subset, so a real `DOMRect` satisfies this structurally too).
|
|
340
|
-
* See {@link RectProvider} for the coordinate space (host-relative, not viewport). */
|
|
341
|
-
export interface DOMRectLike {
|
|
342
|
-
x: number;
|
|
343
|
-
y: number;
|
|
344
|
-
width: number;
|
|
345
|
-
height: number;
|
|
346
|
-
}
|
|
347
|
-
/** Per-node screen geometry — the KEYSTONE omission today (nothing produces rects the
|
|
348
|
-
* ported inspect.ts math consumes). Coordinates are **host-relative** px: relative to
|
|
349
|
-
* the adapter's own mounted world surface (its `position:absolute; inset:0` layer), the
|
|
350
|
-
* same surface the A3 selection overlay is hosted over, so the overlay can draw against
|
|
351
|
-
* these rects directly. (NOT viewport-client — the JSDoc formerly said so in error.) */
|
|
352
|
-
export interface RectProvider {
|
|
353
|
-
/** selectable node id → its current bounding rect, or null if unmounted/offscreen */
|
|
354
|
-
rect(id: string): {
|
|
355
|
-
x: number;
|
|
356
|
-
y: number;
|
|
357
|
-
width: number;
|
|
358
|
-
height: number;
|
|
359
|
-
} | null;
|
|
360
|
-
/** rects of layout-relevant neighbours, for snap/measure/box-model overlays */
|
|
361
|
-
contextRects?(id: string): {
|
|
362
|
-
parent?: DOMRectLike;
|
|
363
|
-
siblings?: DOMRectLike[];
|
|
364
|
-
paddingBox?: DOMRectLike;
|
|
365
|
-
};
|
|
366
|
-
/**
|
|
367
|
-
* D3 (spec 27 §6) — every currently-empty container this adapter's tree
|
|
368
|
-
* contains right now: no visible children, no text, a collapsed dimension
|
|
369
|
-
* (the `ui-source/inspect.ts:findEmptyContainers` math) — each with a
|
|
370
|
-
* grown-to-tappable placeholder rect and a display name, driving the
|
|
371
|
-
* overlay's dashed empty-container hint. Host-relative, same coordinate
|
|
372
|
-
* space as {@link rect}. Absent ⇒ this adapter has no "empty container"
|
|
373
|
-
* concept (e.g. an adapter with no structural containers at all) — no
|
|
374
|
-
* hints are drawn for it.
|
|
375
|
-
*/
|
|
376
|
-
emptyContainers?(): {
|
|
377
|
-
id: string;
|
|
378
|
-
rect: DOMRectLike;
|
|
379
|
-
displayName: string;
|
|
380
|
-
}[];
|
|
381
|
-
}
|
|
382
|
-
/** Spatial gesture → source/data write, for non-Object3D (DOM) nodes. Distinct from the
|
|
383
|
-
* 3D TransformProvider. begin/apply/end bracket a single undo step; apply is live-preview. */
|
|
384
|
-
export interface BoxEditProvider {
|
|
385
|
-
begin(id: string): void;
|
|
386
|
-
/** patch: any of x,y,width,height,marginTop… paddingLeft… — px deltas or absolutes */
|
|
387
|
-
apply(id: string, patch: Record<string, number>): void;
|
|
388
|
-
end(id: string): void;
|
|
389
|
-
}
|
|
390
|
-
/** Text-content editing — currently OFF-contract (the react adapter has an `editText(id)`
|
|
391
|
-
* method, react-world-authoring-adapter.ts:728, not reachable via the contract). Bring it
|
|
392
|
-
* on so the overlay's double-click-to-edit-text (D3) is contract-driven. */
|
|
393
|
-
export interface TextProvider {
|
|
394
|
-
/** the element's editable pure-text, or null if the body is dynamic/has child elements */
|
|
395
|
-
get(id: string): string | null;
|
|
396
|
-
set(id: string, text: string): void;
|
|
397
|
-
}
|
|
398
|
-
/**
|
|
399
|
-
* D3 (spec 27 §6) — background-color sampling at a viewport point, for the
|
|
400
|
-
* eyedropper's FALLBACK path (browsers with no native `EyeDropper` API). The
|
|
401
|
-
* native API, where available, samples real rendered pixels itself and needs
|
|
402
|
-
* none of this. Distinct from {@link PickProvider} (which returns a node id,
|
|
403
|
-
* not a color) and from `InspectorProvider.get('style.backgroundColor')`
|
|
404
|
-
* (which NORMALIZES to `#rrggbb` and so loses the "transparent" signal a
|
|
405
|
-
* color CHAIN walk needs — see `ui-source/inspect.ts:effectiveColorFromChain`'s
|
|
406
|
-
* doc comment: it walks raw, un-normalized CSS values looking for the first
|
|
407
|
-
* non-transparent one).
|
|
408
|
-
*/
|
|
409
|
-
export interface ColorSampleProvider {
|
|
410
|
-
/** Raw (un-normalized) CSS `background-color` values, hit-element FIRST,
|
|
411
|
-
* walking up its ancestor chain — the exact shape
|
|
412
|
-
* `effectiveColorFromChain` consumes. `null` when nothing is hit at the
|
|
413
|
-
* point. Client (viewport) px, matching {@link PickProvider}. */
|
|
414
|
-
backgroundChainAt(clientX: number, clientY: number): string[] | null;
|
|
415
|
-
}
|
|
416
|
-
export interface AuthoringAdapter {
|
|
417
|
-
readonly capabilities: AuthoringCapabilities;
|
|
418
|
-
/** Spec 29 §5 — seam-level provenance ("what is truth behind these rows").
|
|
419
|
-
* Absent ⇒ the shell shows no provenance badge (degrade silently — never
|
|
420
|
-
* fabricate a claim the adapter didn't make). */
|
|
421
|
-
readonly provenance?: AuthoringProvenance;
|
|
422
|
-
readonly hierarchy: HierarchyProvider;
|
|
423
|
-
readonly selection?: SelectionProvider;
|
|
424
|
-
readonly transforms?: TransformProvider;
|
|
425
|
-
readonly inspector?: InspectorProvider;
|
|
426
|
-
/** UI layout authoring path (K7) — present on UI adapters, absent on 3D adapters. */
|
|
427
|
-
readonly layout?: LayoutProvider;
|
|
428
|
-
readonly structure?: StructureProvider;
|
|
429
|
-
readonly persistence?: PersistenceProvider;
|
|
430
|
-
/** D8 — mutually-exclusive root groups (radio roots). Absent ⇒ no grouped roots. */
|
|
431
|
-
readonly rootGroups?: RootGroupsProvider;
|
|
432
|
-
/** D8 — data-file → root mapping. Absent ⇒ this adapter maps no files to roots. */
|
|
433
|
-
readonly files?: FileMapProvider;
|
|
434
|
-
/** D12 — per-layer viewport picking. Absent ⇒ this adapter is not pickable. */
|
|
435
|
-
readonly pickable?: PickProvider;
|
|
436
|
-
/** T0 (spec 27 §2) — per-node screen geometry for a DOM visual editor's overlay/
|
|
437
|
-
* snap/measure math. Absent ⇒ this adapter produces no rects (no overlay). */
|
|
438
|
-
readonly rects?: RectProvider;
|
|
439
|
-
/** T0 (spec 27 §2) — spatial drag-resize/move → source/data write for non-Object3D
|
|
440
|
-
* (DOM) nodes. Absent ⇒ no box-edit gesture for this adapter. */
|
|
441
|
-
readonly boxEdit?: BoxEditProvider;
|
|
442
|
-
/** T0 (spec 27 §2) — double-click-to-edit-text on the contract (wires the react
|
|
443
|
-
* adapter's existing off-contract `editText`). Absent ⇒ no in-place text edit. */
|
|
444
|
-
readonly text?: TextProvider;
|
|
445
|
-
/** D3 (spec 27 §6) — eyedropper fallback color sampling. Absent ⇒ the
|
|
446
|
-
* canvas eyedropper swatch has no non-native path for this adapter. */
|
|
447
|
-
readonly colorSample?: ColorSampleProvider;
|
|
448
|
-
/** D4 — storybook stories. Absent ⇒ no stories for any node in this adapter. */
|
|
449
|
-
readonly stories?: StoriesProvider;
|
|
450
|
-
/** D6 (S-C) — GameComponent management. Absent ⇒ no component authoring. */
|
|
451
|
-
readonly components?: ComponentsProvider;
|
|
452
|
-
/** Asset drop (hierarchy + viewport). Absent ⇒ this adapter accepts no drops. */
|
|
453
|
-
readonly assetDrop?: AssetDropProvider;
|
|
454
|
-
/** Undo/redo for this adapter's edits (first-party delegates to the store; an
|
|
455
|
-
* ingest adapter keeps its own overlay-backed stack). Absent ⇒ host falls back. */
|
|
456
|
-
undo?(): void;
|
|
457
|
-
redo?(): void;
|
|
458
|
-
/** Change notification → UI refresh. */
|
|
459
|
-
subscribe?(listener: () => void): () => void;
|
|
460
|
-
}
|
|
461
|
-
//# sourceMappingURL=authoring.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authoring.d.ts","sourceRoot":"","sources":["../../src/adapter/authoring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7D,mFAAmF;AACnF,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,E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kE;IAClE,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACnC;uFACmF;IACnF,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;IAC7B;4EACwE;IACxE,QAAQ,CAAC,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAC3C,gFAAgF;IAChF,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACnC,4EAA4E;IAC5E,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IACzC,iFAAiF;IACjF,QAAQ,CAAC,SAAS,CAAC,EAAE,iBAAiB,CAAC;IACvC;wFACoF;IACpF,IAAI,CAAC,IAAI,IAAI,CAAC;IACd,IAAI,CAAC,IAAI,IAAI,CAAC;IACd,wCAAwC;IACxC,SAAS,CAAC,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;CAC9C"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AuthoringAdapter — the editor's authoring contract. The editor talks to THIS,
|
|
3
|
-
* keyed by opaque string node ids, instead of to a concrete document format.
|
|
4
|
-
*
|
|
5
|
-
* `.vscn` / `SceneEntity` is the private model of ONE implementer
|
|
6
|
-
* (`VgaiSceneAuthoringAdapter`); an ingested game's adapter implements the same
|
|
7
|
-
* providers directly over its live `Object3D` tree. The editor sees only the
|
|
8
|
-
* interface and the advertised `capabilities` — it never branches on which
|
|
9
|
-
* implementer it is talking to.
|
|
10
|
-
*
|
|
11
|
-
* The interface lives in the engine (not the editor) so `MountedGame.authoring`
|
|
12
|
-
* can reference it without the engine depending on the editor; implementers live
|
|
13
|
-
* in `packages/editor/src/authoring/`.
|
|
14
|
-
*
|
|
15
|
-
* **Reserved inspector paths convention:** the property paths `name`, `visible`,
|
|
16
|
-
* and `locked` are reserved — an adapter that supports them exposes them through
|
|
17
|
-
* the ordinary `InspectorProvider.get`/`set` (no separate provider). The shell
|
|
18
|
-
* renders the hierarchy panel's rename field, eye (visibility) toggle, and lock
|
|
19
|
-
* toggle against these three paths, generically, for any adapter that reports
|
|
20
|
-
* them via `InspectorProvider.properties`.
|
|
21
|
-
*/
|
|
22
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ColyseusNetworkingAdapter — the first-party `NetworkingAdapter`. This is an
|
|
3
|
-
* INTROSPECTION / coordination boundary, NOT a transport: it lets the editor ask
|
|
4
|
-
* "is this object replicated, who owns it, may I edit it" — and, for the network
|
|
5
|
-
* inspector panel, "am I connected, to which room, how much replication activity
|
|
6
|
-
* is happening" — without owning Colyseus.
|
|
7
|
-
*
|
|
8
|
-
* It is parameterized by accessors over the room state (rather than a fixed schema)
|
|
9
|
-
* so any Colyseus room can supply one: map an `Object3D` to its network id + owner,
|
|
10
|
-
* report the local session and peers, and report connection/room/stats for the
|
|
11
|
-
* inspector. The editor uses `authority`/`editable` to keep remote/server-
|
|
12
|
-
* authoritative objects inspect-only (editing a replicated transform locally is
|
|
13
|
-
* meaningless — the server overwrites it next snapshot).
|
|
14
|
-
*/
|
|
15
|
-
import type * as THREE from 'three';
|
|
16
|
-
import type { ConnectionState, NetPeer, NetworkingAdapter, ReplicationStats, RoomInfo, Unsubscribe } from './system-adapter';
|
|
17
|
-
export interface ColyseusNetworkingConfig {
|
|
18
|
-
/** The local peer's session id (objects it owns are editable). */
|
|
19
|
-
localSessionId(): string | null;
|
|
20
|
-
/** Peers currently in the room. */
|
|
21
|
-
peers(): NetPeer[];
|
|
22
|
-
/** Network id for an object, or null if it is not replicated (→ local authored). */
|
|
23
|
-
networkId(o: THREE.Object3D): string | null;
|
|
24
|
-
/** Owning peer/session id for a replicated object (null = server-owned). */
|
|
25
|
-
ownerId(o: THREE.Object3D): string | null;
|
|
26
|
-
/** True if the server is authoritative over this object (→ inspect-only). */
|
|
27
|
-
serverAuthoritative?(o: THREE.Object3D): boolean;
|
|
28
|
-
/** Current connection lifecycle state, for the network inspector panel.
|
|
29
|
-
* Optional — defaults to `'disconnected'` for implementers that only need
|
|
30
|
-
* object authority/editability (the pre-inspector config shape). */
|
|
31
|
-
connectionState?(): ConnectionState;
|
|
32
|
-
/** The active room's identity, or `null` when not connected to a room.
|
|
33
|
-
* Optional — defaults to `null`. */
|
|
34
|
-
roomInfo?(): RoomInfo | null;
|
|
35
|
-
/** Replication activity snapshot (entity count + msg rates), for the inspector.
|
|
36
|
-
* Optional — defaults to all-zero stats. */
|
|
37
|
-
replicationStats?(): ReplicationStats;
|
|
38
|
-
/** Subscribe to changes in connection state / room / replication stats.
|
|
39
|
-
* Optional — defaults to a no-op subscription. */
|
|
40
|
-
subscribe?(cb: () => void): Unsubscribe;
|
|
41
|
-
}
|
|
42
|
-
export declare function createColyseusNetworkingAdapter(cfg: ColyseusNetworkingConfig): NetworkingAdapter;
|
|
43
|
-
//# sourceMappingURL=colyseus-networking-adapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colyseus-networking-adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/colyseus-networking-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EACV,eAAe,EACf,OAAO,EACP,iBAAiB,EACjB,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,wBAAwB;IACvC,kEAAkE;IAClE,cAAc,IAAI,MAAM,GAAG,IAAI,CAAC;IAChC,mCAAmC;IACnC,KAAK,IAAI,OAAO,EAAE,CAAC;IACnB,oFAAoF;IACpF,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC;IAC5C,4EAA4E;IAC5E,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC;IAC1C,6EAA6E;IAC7E,mBAAmB,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC;IACjD;;yEAEqE;IACrE,eAAe,CAAC,IAAI,eAAe,CAAC;IACpC;yCACqC;IACrC,QAAQ,CAAC,IAAI,QAAQ,GAAG,IAAI,CAAC;IAC7B;iDAC6C;IAC7C,gBAAgB,CAAC,IAAI,gBAAgB,CAAC;IACtC;uDACmD;IACnD,SAAS,CAAC,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,WAAW,CAAC;CACzC;AAED,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,wBAAwB,GAAG,iBAAiB,CAoBhG"}
|