@vgai/engine 0.5.0-canary.20260719.0 → 0.5.0
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/dist/adapter/adapter-surface.d.ts +30 -0
- package/dist/adapter/adapter-surface.d.ts.map +1 -0
- package/dist/adapter/adapter-surface.js +18 -0
- package/dist/adapter/authoring.d.ts +461 -0
- package/dist/adapter/authoring.d.ts.map +1 -0
- package/dist/adapter/authoring.js +22 -0
- package/dist/adapter/colyseus-networking-adapter.d.ts +43 -0
- package/dist/adapter/colyseus-networking-adapter.d.ts.map +1 -0
- package/dist/adapter/colyseus-networking-adapter.js +38 -0
- package/dist/adapter/first-party-systems.d.ts +38 -0
- package/dist/adapter/first-party-systems.d.ts.map +1 -0
- package/dist/adapter/first-party-systems.js +77 -0
- package/dist/adapter/game-adapter.d.ts +133 -0
- package/dist/adapter/game-adapter.d.ts.map +1 -0
- package/dist/adapter/game-adapter.js +10 -0
- package/dist/adapter/host-context.d.ts +71 -0
- package/dist/adapter/host-context.d.ts.map +1 -0
- package/dist/adapter/host-context.js +16 -0
- package/dist/adapter/index.d.ts +22 -0
- package/dist/adapter/index.d.ts.map +1 -0
- package/dist/adapter/index.js +15 -0
- package/dist/adapter/ingest/game-contract.d.ts +53 -0
- package/dist/adapter/ingest/game-contract.d.ts.map +1 -0
- package/dist/adapter/ingest/game-contract.js +30 -0
- package/dist/adapter/ingest/overlay-applier.d.ts +118 -0
- package/dist/adapter/ingest/overlay-applier.d.ts.map +1 -0
- package/dist/adapter/ingest/overlay-applier.js +132 -0
- package/dist/adapter/ingest/overlay-apply.d.ts +60 -0
- package/dist/adapter/ingest/overlay-apply.d.ts.map +1 -0
- package/dist/adapter/ingest/overlay-apply.js +101 -0
- package/dist/adapter/ingest/overlay-file.d.ts +79 -0
- package/dist/adapter/ingest/overlay-file.d.ts.map +1 -0
- package/dist/adapter/ingest/overlay-file.js +66 -0
- package/dist/adapter/ingest/overlay-report.d.ts +113 -0
- package/dist/adapter/ingest/overlay-report.d.ts.map +1 -0
- package/dist/adapter/ingest/overlay-report.js +103 -0
- package/dist/adapter/ingest/scene-capture.d.ts +97 -0
- package/dist/adapter/ingest/scene-capture.d.ts.map +1 -0
- package/dist/adapter/ingest/scene-capture.js +248 -0
- package/dist/adapter/ingest/upstream-pin.d.ts +47 -0
- package/dist/adapter/ingest/upstream-pin.d.ts.map +1 -0
- package/dist/adapter/ingest/upstream-pin.js +50 -0
- package/dist/adapter/loop-gate-report.d.ts +34 -0
- package/dist/adapter/loop-gate-report.d.ts.map +1 -0
- package/dist/adapter/loop-gate-report.js +37 -0
- package/dist/adapter/rapier-physics-adapter.d.ts +12 -0
- package/dist/adapter/rapier-physics-adapter.d.ts.map +1 -0
- package/dist/adapter/rapier-physics-adapter.js +46 -0
- package/dist/adapter/system-adapter.d.ts +206 -0
- package/dist/adapter/system-adapter.d.ts.map +1 -0
- package/dist/adapter/system-adapter.js +13 -0
- package/dist/adapter/transform.d.ts +18 -0
- package/dist/adapter/transform.d.ts.map +1 -0
- package/dist/adapter/transform.js +1 -0
- package/dist/adapter/vgai-scene-game-adapter.d.ts +108 -0
- package/dist/adapter/vgai-scene-game-adapter.d.ts.map +1 -0
- package/dist/adapter/vgai-scene-game-adapter.js +762 -0
- package/dist/ai/navigation.d.ts +64 -0
- package/dist/ai/navigation.d.ts.map +1 -0
- package/dist/ai/navigation.js +133 -0
- package/dist/animation/anim-graph-types.d.ts +25 -0
- package/dist/animation/anim-graph-types.d.ts.map +1 -0
- package/dist/animation/anim-graph-types.js +1 -0
- package/dist/animation/animation-clock.d.ts +213 -0
- package/dist/animation/animation-clock.d.ts.map +1 -0
- package/dist/animation/animation-clock.js +301 -0
- package/dist/animation/blend-node.d.ts +22 -0
- package/dist/animation/blend-node.d.ts.map +1 -0
- package/dist/animation/blend-node.js +97 -0
- package/dist/animation/camera-ownership.d.ts +250 -0
- package/dist/animation/camera-ownership.d.ts.map +1 -0
- package/dist/animation/camera-ownership.js +169 -0
- package/dist/animation/cinematic-cues.d.ts +200 -0
- package/dist/animation/cinematic-cues.d.ts.map +1 -0
- package/dist/animation/cinematic-cues.js +213 -0
- package/dist/animation/clip-map.d.ts +12 -0
- package/dist/animation/clip-map.d.ts.map +1 -0
- package/dist/animation/clip-map.js +37 -0
- package/dist/animation/gsap-registration.d.ts +119 -0
- package/dist/animation/gsap-registration.d.ts.map +1 -0
- package/dist/animation/gsap-registration.js +92 -0
- package/dist/animation/theatre-clock-binding.d.ts +89 -0
- package/dist/animation/theatre-clock-binding.d.ts.map +1 -0
- package/dist/animation/theatre-clock-binding.js +29 -0
- package/dist/animation/theatre-director.d.ts +242 -0
- package/dist/animation/theatre-director.d.ts.map +1 -0
- package/dist/animation/theatre-director.js +235 -0
- package/dist/animation/theatre-object-binding.d.ts +305 -0
- package/dist/animation/theatre-object-binding.d.ts.map +1 -0
- package/dist/animation/theatre-object-binding.js +351 -0
- package/dist/animation/xstate-animation-binding.d.ts +56 -0
- package/dist/animation/xstate-animation-binding.d.ts.map +1 -0
- package/dist/animation/xstate-animation-binding.js +331 -0
- package/dist/animation/xstate-animation-meta.d.ts +266 -0
- package/dist/animation/xstate-animation-meta.d.ts.map +1 -0
- package/dist/animation/xstate-animation-meta.js +252 -0
- package/dist/assets.d.ts +26 -0
- package/dist/assets.d.ts.map +1 -0
- package/dist/assets.js +55 -0
- package/dist/audio/index.d.ts +4 -0
- package/dist/audio/index.d.ts.map +1 -0
- package/dist/audio/index.js +24 -0
- package/dist/audio/tone-clock-binding.d.ts +75 -0
- package/dist/audio/tone-clock-binding.d.ts.map +1 -0
- package/dist/audio/tone-clock-binding.js +29 -0
- package/dist/audio/tone-context.d.ts +114 -0
- package/dist/audio/tone-context.d.ts.map +1 -0
- package/dist/audio/tone-context.js +39 -0
- package/dist/audio/tone-offline-render.d.ts +90 -0
- package/dist/audio/tone-offline-render.d.ts.map +1 -0
- package/dist/audio/tone-offline-render.js +56 -0
- package/dist/audio/wav-encode.d.ts +38 -0
- package/dist/audio/wav-encode.d.ts.map +1 -0
- package/dist/audio/wav-encode.js +97 -0
- package/dist/character/cloth-sim.d.ts +179 -0
- package/dist/character/cloth-sim.d.ts.map +1 -0
- package/dist/character/cloth-sim.js +334 -0
- package/dist/character/spring-chain.d.ts +135 -0
- package/dist/character/spring-chain.d.ts.map +1 -0
- package/dist/character/spring-chain.js +165 -0
- package/dist/core/game-loop.d.ts +42 -0
- package/dist/core/game-loop.d.ts.map +1 -0
- package/dist/core/game-loop.js +167 -0
- package/dist/core/seeded-random.d.ts +69 -0
- package/dist/core/seeded-random.d.ts.map +1 -0
- package/dist/core/seeded-random.js +121 -0
- package/dist/core/system-runner.d.ts +120 -0
- package/dist/core/system-runner.d.ts.map +1 -0
- package/dist/core/system-runner.js +297 -0
- package/dist/core/types.d.ts +92 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +25 -0
- package/dist/data/data-asset.d.ts +101 -0
- package/dist/data/data-asset.d.ts.map +1 -0
- package/dist/data/data-asset.js +122 -0
- package/dist/data/data-check-core.d.ts +110 -0
- package/dist/data/data-check-core.d.ts.map +1 -0
- package/dist/data/data-check-core.js +178 -0
- package/dist/data/data-ref.d.ts +79 -0
- package/dist/data/data-ref.d.ts.map +1 -0
- package/dist/data/data-ref.js +130 -0
- package/dist/data/vite-plugin-data.d.ts +79 -0
- package/dist/data/vite-plugin-data.d.ts.map +1 -0
- package/dist/data/vite-plugin-data.js +217 -0
- package/dist/dev/console-bridge.d.ts +22 -0
- package/dist/dev/console-bridge.d.ts.map +1 -0
- package/dist/dev/console-bridge.js +71 -0
- package/dist/dev/debug-draw.d.ts +24 -0
- package/dist/dev/debug-draw.d.ts.map +1 -0
- package/dist/dev/debug-draw.js +73 -0
- package/dist/dev/logger.d.ts +30 -0
- package/dist/dev/logger.d.ts.map +1 -0
- package/dist/dev/logger.js +90 -0
- package/dist/dev/performance-profiler.d.ts +60 -0
- package/dist/dev/performance-profiler.d.ts.map +1 -0
- package/dist/dev/performance-profiler.js +181 -0
- package/dist/dev/webgl-gpu-timer.d.ts +8 -0
- package/dist/dev/webgl-gpu-timer.d.ts.map +1 -0
- package/dist/dev/webgl-gpu-timer.js +52 -0
- package/dist/ecs/component-manager.d.ts +205 -0
- package/dist/ecs/component-manager.d.ts.map +1 -0
- package/dist/ecs/component-manager.js +706 -0
- package/dist/ecs/game-component.d.ts +146 -0
- package/dist/ecs/game-component.d.ts.map +1 -0
- package/dist/ecs/game-component.js +141 -0
- package/dist/ecs/hmr-swap-report.d.ts +53 -0
- package/dist/ecs/hmr-swap-report.d.ts.map +1 -0
- package/dist/ecs/hmr-swap-report.js +55 -0
- package/dist/humanoid/bake.operation.d.ts +119 -0
- package/dist/humanoid/bake.operation.d.ts.map +1 -0
- package/dist/humanoid/bake.operation.js +228 -0
- package/dist/humanoid/body.d.ts +101 -0
- package/dist/humanoid/body.d.ts.map +1 -0
- package/dist/humanoid/body.js +530 -0
- package/dist/humanoid/clips.d.ts +62 -0
- package/dist/humanoid/clips.d.ts.map +1 -0
- package/dist/humanoid/clips.js +121 -0
- package/dist/humanoid/compose.d.ts +75 -0
- package/dist/humanoid/compose.d.ts.map +1 -0
- package/dist/humanoid/compose.js +176 -0
- package/dist/humanoid/generate.d.ts +92 -0
- package/dist/humanoid/generate.d.ts.map +1 -0
- package/dist/humanoid/generate.js +124 -0
- package/dist/humanoid/index.d.ts +24 -0
- package/dist/humanoid/index.d.ts.map +1 -0
- package/dist/humanoid/index.js +18 -0
- package/dist/humanoid/schema.d.ts +35 -0
- package/dist/humanoid/schema.d.ts.map +1 -0
- package/dist/humanoid/schema.js +87 -0
- package/dist/humanoid/skeleton.d.ts +103 -0
- package/dist/humanoid/skeleton.d.ts.map +1 -0
- package/dist/humanoid/skeleton.js +289 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30 -0
- package/dist/input/input-manager.d.ts +945 -0
- package/dist/input/input-manager.d.ts.map +1 -0
- package/dist/input/input-manager.js +2207 -0
- package/dist/input/input-types.d.ts +174 -0
- package/dist/input/input-types.d.ts.map +1 -0
- package/dist/input/input-types.js +1 -0
- package/dist/input/prompt-labels.d.ts +21 -0
- package/dist/input/prompt-labels.d.ts.map +1 -0
- package/dist/input/prompt-labels.js +121 -0
- package/dist/input/rebind-controller.d.ts +59 -0
- package/dist/input/rebind-controller.d.ts.map +1 -0
- package/dist/input/rebind-controller.js +85 -0
- package/dist/input/schema.d.ts +16 -0
- package/dist/input/schema.d.ts.map +1 -0
- package/dist/input/schema.js +228 -0
- package/dist/loader.d.ts +43 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +59 -0
- package/dist/manifest/index.d.ts +5 -0
- package/dist/manifest/index.d.ts.map +1 -0
- package/dist/manifest/index.js +8 -0
- package/dist/manifest/load-file.d.ts +4 -0
- package/dist/manifest/load-file.d.ts.map +1 -0
- package/dist/manifest/load-file.js +14 -0
- package/dist/manifest/load.d.ts +144 -0
- package/dist/manifest/load.d.ts.map +1 -0
- package/dist/manifest/load.js +273 -0
- package/dist/manifest/schema.d.ts +230 -0
- package/dist/manifest/schema.d.ts.map +1 -0
- package/dist/manifest/schema.js +394 -0
- package/dist/physics/collision-system.d.ts +41 -0
- package/dist/physics/collision-system.d.ts.map +1 -0
- package/dist/physics/collision-system.js +64 -0
- package/dist/physics/physics-registry.d.ts +45 -0
- package/dist/physics/physics-registry.d.ts.map +1 -0
- package/dist/physics/physics-registry.js +65 -0
- package/dist/physics/transform-writer.d.ts +16 -0
- package/dist/physics/transform-writer.d.ts.map +1 -0
- package/dist/physics/transform-writer.js +38 -0
- package/dist/physics/trigger-dispatch.d.ts +24 -0
- package/dist/physics/trigger-dispatch.d.ts.map +1 -0
- package/dist/physics/trigger-dispatch.js +80 -0
- package/dist/react/game-state.d.ts +156 -0
- package/dist/react/game-state.d.ts.map +1 -0
- package/dist/react/game-state.js +222 -0
- package/dist/react/root-adapter.d.ts +11 -0
- package/dist/react/root-adapter.d.ts.map +1 -0
- package/dist/react/root-adapter.js +41 -0
- package/dist/react/unmanaged-root-detector.d.ts +12 -0
- package/dist/react/unmanaged-root-detector.d.ts.map +1 -0
- package/dist/react/unmanaged-root-detector.js +45 -0
- package/dist/react/use-data.d.ts +60 -0
- package/dist/react/use-data.d.ts.map +1 -0
- package/dist/react/use-data.js +101 -0
- package/dist/react/use-selection.d.ts +75 -0
- package/dist/react/use-selection.d.ts.map +1 -0
- package/dist/react/use-selection.js +90 -0
- package/dist/render/auto-batcher.d.ts +34 -0
- package/dist/render/auto-batcher.d.ts.map +1 -0
- package/dist/render/auto-batcher.js +140 -0
- package/dist/render/render-batch-system.d.ts +33 -0
- package/dist/render/render-batch-system.d.ts.map +1 -0
- package/dist/render/render-batch-system.js +230 -0
- package/dist/render/render-features.d.ts +47 -0
- package/dist/render/render-features.d.ts.map +1 -0
- package/dist/render/render-features.js +105 -0
- package/dist/render/render-settings.d.ts +36 -0
- package/dist/render/render-settings.d.ts.map +1 -0
- package/dist/render/render-settings.js +51 -0
- package/dist/runtime/create-runtime.d.ts +249 -0
- package/dist/runtime/create-runtime.d.ts.map +1 -0
- package/dist/runtime/create-runtime.js +641 -0
- package/dist/runtime/debug-bridge.d.ts +257 -0
- package/dist/runtime/debug-bridge.d.ts.map +1 -0
- package/dist/runtime/debug-bridge.js +224 -0
- package/dist/runtime/debug-registry.d.ts +288 -0
- package/dist/runtime/debug-registry.d.ts.map +1 -0
- package/dist/runtime/debug-registry.js +513 -0
- package/dist/runtime/frame-selector-cache.d.ts +41 -0
- package/dist/runtime/frame-selector-cache.d.ts.map +1 -0
- package/dist/runtime/frame-selector-cache.js +65 -0
- package/dist/runtime/game.d.ts +496 -0
- package/dist/runtime/game.d.ts.map +1 -0
- package/dist/runtime/game.js +741 -0
- package/dist/runtime/gameplay-rng-trap.d.ts +48 -0
- package/dist/runtime/gameplay-rng-trap.d.ts.map +1 -0
- package/dist/runtime/gameplay-rng-trap.js +96 -0
- package/dist/runtime/input-router.d.ts +78 -0
- package/dist/runtime/input-router.d.ts.map +1 -0
- package/dist/runtime/input-router.js +171 -0
- package/dist/runtime/mount-game.d.ts +129 -0
- package/dist/runtime/mount-game.d.ts.map +1 -0
- package/dist/runtime/mount-game.js +152 -0
- package/dist/runtime/mount-manifest.d.ts +173 -0
- package/dist/runtime/mount-manifest.d.ts.map +1 -0
- package/dist/runtime/mount-manifest.js +297 -0
- package/dist/runtime/render-audio-control.d.ts +110 -0
- package/dist/runtime/render-audio-control.d.ts.map +1 -0
- package/dist/runtime/render-audio-control.js +111 -0
- package/dist/runtime/render-control.d.ts +291 -0
- package/dist/runtime/render-control.d.ts.map +1 -0
- package/dist/runtime/render-control.js +264 -0
- package/dist/runtime/render-seed.d.ts +57 -0
- package/dist/runtime/render-seed.d.ts.map +1 -0
- package/dist/runtime/render-seed.js +74 -0
- package/dist/runtime/state-bridge.d.ts +61 -0
- package/dist/runtime/state-bridge.d.ts.map +1 -0
- package/dist/runtime/state-bridge.js +63 -0
- package/dist/runtime/types.d.ts +253 -0
- package/dist/runtime/types.d.ts.map +1 -0
- package/dist/runtime/types.js +1 -0
- package/dist/scene/asset-loaders.d.ts +79 -0
- package/dist/scene/asset-loaders.d.ts.map +1 -0
- package/dist/scene/asset-loaders.js +141 -0
- package/dist/scene/asset-paths.d.ts +11 -0
- package/dist/scene/asset-paths.d.ts.map +1 -0
- package/dist/scene/asset-paths.js +108 -0
- package/dist/scene/asset-ref-check.d.ts +88 -0
- package/dist/scene/asset-ref-check.d.ts.map +1 -0
- package/dist/scene/asset-ref-check.js +214 -0
- package/dist/scene/asset-registry.d.ts +38 -0
- package/dist/scene/asset-registry.d.ts.map +1 -0
- package/dist/scene/asset-registry.js +66 -0
- package/dist/scene/collider-dimensions.d.ts +63 -0
- package/dist/scene/collider-dimensions.d.ts.map +1 -0
- package/dist/scene/collider-dimensions.js +98 -0
- package/dist/scene/component-registry.d.ts +22 -0
- package/dist/scene/component-registry.d.ts.map +1 -0
- package/dist/scene/component-registry.js +37 -0
- package/dist/scene/defaults.d.ts +252 -0
- package/dist/scene/defaults.d.ts.map +1 -0
- package/dist/scene/defaults.js +151 -0
- package/dist/scene/geometries/index.d.ts +8 -0
- package/dist/scene/geometries/index.d.ts.map +1 -0
- package/dist/scene/geometries/index.js +7 -0
- package/dist/scene/geometries/terrain.d.ts +2 -0
- package/dist/scene/geometries/terrain.d.ts.map +1 -0
- package/dist/scene/geometries/terrain.js +37 -0
- package/dist/scene/geometry-registry.d.ts +24 -0
- package/dist/scene/geometry-registry.d.ts.map +1 -0
- package/dist/scene/geometry-registry.js +20 -0
- package/dist/scene/instance-registry.d.ts +36 -0
- package/dist/scene/instance-registry.d.ts.map +1 -0
- package/dist/scene/instance-registry.js +55 -0
- package/dist/scene/instancers/grid.d.ts +2 -0
- package/dist/scene/instancers/grid.d.ts.map +1 -0
- package/dist/scene/instancers/grid.js +36 -0
- package/dist/scene/instancers/index.d.ts +8 -0
- package/dist/scene/instancers/index.d.ts.map +1 -0
- package/dist/scene/instancers/index.js +7 -0
- package/dist/scene/light-camera-factory.d.ts +23 -0
- package/dist/scene/light-camera-factory.d.ts.map +1 -0
- package/dist/scene/light-camera-factory.js +68 -0
- package/dist/scene/material-factory.d.ts +17 -0
- package/dist/scene/material-factory.d.ts.map +1 -0
- package/dist/scene/material-factory.js +197 -0
- package/dist/scene/material-registry.d.ts +40 -0
- package/dist/scene/material-registry.d.ts.map +1 -0
- package/dist/scene/material-registry.js +44 -0
- package/dist/scene/materials/index.d.ts +8 -0
- package/dist/scene/materials/index.d.ts.map +1 -0
- package/dist/scene/materials/index.js +7 -0
- package/dist/scene/materials/water.d.ts +2 -0
- package/dist/scene/materials/water.d.ts.map +1 -0
- package/dist/scene/materials/water.js +54 -0
- package/dist/scene/parse.d.ts +23 -0
- package/dist/scene/parse.d.ts.map +1 -0
- package/dist/scene/parse.js +179 -0
- package/dist/scene/particles-factory.d.ts +33 -0
- package/dist/scene/particles-factory.d.ts.map +1 -0
- package/dist/scene/particles-factory.js +282 -0
- package/dist/scene/scene-apply.d.ts +109 -0
- package/dist/scene/scene-apply.d.ts.map +1 -0
- package/dist/scene/scene-apply.js +370 -0
- package/dist/scene/scene-diff-schema.d.ts +285 -0
- package/dist/scene/scene-diff-schema.d.ts.map +1 -0
- package/dist/scene/scene-diff-schema.js +92 -0
- package/dist/scene/scene-diff-types.d.ts +40 -0
- package/dist/scene/scene-diff-types.d.ts.map +1 -0
- package/dist/scene/scene-diff-types.js +14 -0
- package/dist/scene/scene-loader.d.ts +167 -0
- package/dist/scene/scene-loader.d.ts.map +1 -0
- package/dist/scene/scene-loader.js +1211 -0
- package/dist/scene/scene-query.d.ts +11 -0
- package/dist/scene/scene-query.d.ts.map +1 -0
- package/dist/scene/scene-query.js +63 -0
- package/dist/scene/scene-types.d.ts +10 -0
- package/dist/scene/scene-types.d.ts.map +1 -0
- package/dist/scene/scene-types.js +8 -0
- package/dist/scene/scene-version.d.ts +26 -0
- package/dist/scene/scene-version.d.ts.map +1 -0
- package/dist/scene/scene-version.js +34 -0
- package/dist/scene/schema/animation.d.ts +8 -0
- package/dist/scene/schema/animation.d.ts.map +1 -0
- package/dist/scene/schema/animation.js +42 -0
- package/dist/scene/schema/audio.d.ts +13 -0
- package/dist/scene/schema/audio.d.ts.map +1 -0
- package/dist/scene/schema/audio.js +22 -0
- package/dist/scene/schema/camera.d.ts +28 -0
- package/dist/scene/schema/camera.d.ts.map +1 -0
- package/dist/scene/schema/camera.js +17 -0
- package/dist/scene/schema/collider.d.ts +40 -0
- package/dist/scene/schema/collider.d.ts.map +1 -0
- package/dist/scene/schema/collider.js +55 -0
- package/dist/scene/schema/entity-ref.d.ts +31 -0
- package/dist/scene/schema/entity-ref.d.ts.map +1 -0
- package/dist/scene/schema/entity-ref.js +61 -0
- package/dist/scene/schema/entity.d.ts +1036 -0
- package/dist/scene/schema/entity.d.ts.map +1 -0
- package/dist/scene/schema/entity.js +153 -0
- package/dist/scene/schema/environment.d.ts +425 -0
- package/dist/scene/schema/environment.d.ts.map +1 -0
- package/dist/scene/schema/environment.js +357 -0
- package/dist/scene/schema/index.d.ts +37 -0
- package/dist/scene/schema/index.d.ts.map +1 -0
- package/dist/scene/schema/index.js +19 -0
- package/dist/scene/schema/instances.d.ts +14 -0
- package/dist/scene/schema/instances.d.ts.map +1 -0
- package/dist/scene/schema/instances.js +28 -0
- package/dist/scene/schema/joint.d.ts +23 -0
- package/dist/scene/schema/joint.d.ts.map +1 -0
- package/dist/scene/schema/joint.js +23 -0
- package/dist/scene/schema/light.d.ts +38 -0
- package/dist/scene/schema/light.d.ts.map +1 -0
- package/dist/scene/schema/light.js +26 -0
- package/dist/scene/schema/material.d.ts +199 -0
- package/dist/scene/schema/material.d.ts.map +1 -0
- package/dist/scene/schema/material.js +103 -0
- package/dist/scene/schema/mesh.d.ts +48 -0
- package/dist/scene/schema/mesh.d.ts.map +1 -0
- package/dist/scene/schema/mesh.js +82 -0
- package/dist/scene/schema/particles.d.ts +2178 -0
- package/dist/scene/schema/particles.d.ts.map +1 -0
- package/dist/scene/schema/particles.js +321 -0
- package/dist/scene/schema/physics.d.ts +56 -0
- package/dist/scene/schema/physics.d.ts.map +1 -0
- package/dist/scene/schema/physics.js +37 -0
- package/dist/scene/schema/scene-file.d.ts +303 -0
- package/dist/scene/schema/scene-file.d.ts.map +1 -0
- package/dist/scene/schema/scene-file.js +256 -0
- package/dist/scene/schema/shadow.d.ts +28 -0
- package/dist/scene/schema/shadow.d.ts.map +1 -0
- package/dist/scene/schema/shadow.js +20 -0
- package/dist/scene/schema/spline.d.ts +25 -0
- package/dist/scene/schema/spline.d.ts.map +1 -0
- package/dist/scene/schema/spline.js +15 -0
- package/dist/scene/schema/tuples.d.ts +12 -0
- package/dist/scene/schema/tuples.d.ts.map +1 -0
- package/dist/scene/schema/tuples.js +14 -0
- package/dist/scene/user-data.d.ts +185 -0
- package/dist/scene/user-data.d.ts.map +1 -0
- package/dist/scene/user-data.js +144 -0
- package/dist/setup/setup-audio.d.ts +20 -0
- package/dist/setup/setup-audio.d.ts.map +1 -0
- package/dist/setup/setup-audio.js +41 -0
- package/dist/setup/setup-particles.d.ts +17 -0
- package/dist/setup/setup-particles.d.ts.map +1 -0
- package/dist/setup/setup-particles.js +16 -0
- package/dist/setup/setup-physics.d.ts +25 -0
- package/dist/setup/setup-physics.d.ts.map +1 -0
- package/dist/setup/setup-physics.js +51 -0
- package/dist/setup/setup-renderer.d.ts +69 -0
- package/dist/setup/setup-renderer.d.ts.map +1 -0
- package/dist/setup/setup-renderer.js +363 -0
- package/dist/tools/define-tool.d.ts +130 -0
- package/dist/tools/define-tool.d.ts.map +1 -0
- package/dist/tools/define-tool.js +96 -0
- package/dist/world2d/authoring-2d.d.ts +80 -0
- package/dist/world2d/authoring-2d.d.ts.map +1 -0
- package/dist/world2d/authoring-2d.js +195 -0
- package/dist/world2d/capture-to-scene2d.d.ts +5 -0
- package/dist/world2d/capture-to-scene2d.d.ts.map +1 -0
- package/dist/world2d/capture-to-scene2d.js +49 -0
- package/dist/world2d/collision-2d.d.ts +52 -0
- package/dist/world2d/collision-2d.d.ts.map +1 -0
- package/dist/world2d/collision-2d.js +70 -0
- package/dist/world2d/components-2d.d.ts +47 -0
- package/dist/world2d/components-2d.d.ts.map +1 -0
- package/dist/world2d/components-2d.js +77 -0
- package/dist/world2d/index.d.ts +34 -0
- package/dist/world2d/index.d.ts.map +1 -0
- package/dist/world2d/index.js +32 -0
- package/dist/world2d/ingest-iframe-2d.d.ts +82 -0
- package/dist/world2d/ingest-iframe-2d.d.ts.map +1 -0
- package/dist/world2d/ingest-iframe-2d.js +166 -0
- package/dist/world2d/ingest2d.d.ts +97 -0
- package/dist/world2d/ingest2d.d.ts.map +1 -0
- package/dist/world2d/ingest2d.js +40 -0
- package/dist/world2d/physics2d-registry.d.ts +24 -0
- package/dist/world2d/physics2d-registry.d.ts.map +1 -0
- package/dist/world2d/physics2d-registry.js +38 -0
- package/dist/world2d/pixi-game-adapter.d.ts +107 -0
- package/dist/world2d/pixi-game-adapter.d.ts.map +1 -0
- package/dist/world2d/pixi-game-adapter.js +210 -0
- package/dist/world2d/pixi-surface.d.ts +39 -0
- package/dist/world2d/pixi-surface.d.ts.map +1 -0
- package/dist/world2d/pixi-surface.js +47 -0
- package/dist/world2d/scene-capture-2d.d.ts +43 -0
- package/dist/world2d/scene-capture-2d.d.ts.map +1 -0
- package/dist/world2d/scene-capture-2d.js +92 -0
- package/dist/world2d/scene2d-loader.d.ts +27 -0
- package/dist/world2d/scene2d-loader.d.ts.map +1 -0
- package/dist/world2d/scene2d-loader.js +275 -0
- package/dist/world2d/schema/entity2d.d.ts +102 -0
- package/dist/world2d/schema/entity2d.d.ts.map +1 -0
- package/dist/world2d/schema/entity2d.js +119 -0
- package/dist/world2d/schema/physics2d.d.ts +46 -0
- package/dist/world2d/schema/physics2d.d.ts.map +1 -0
- package/dist/world2d/schema/physics2d.js +45 -0
- package/dist/world2d/schema/sprite.d.ts +42 -0
- package/dist/world2d/schema/sprite.d.ts.map +1 -0
- package/dist/world2d/schema/sprite.js +63 -0
- package/dist/world2d/schema/tilemap.d.ts +15 -0
- package/dist/world2d/schema/tilemap.d.ts.map +1 -0
- package/dist/world2d/schema/tilemap.js +19 -0
- package/dist/world2d/schema/tuples2d.d.ts +20 -0
- package/dist/world2d/schema/tuples2d.d.ts.map +1 -0
- package/dist/world2d/schema/tuples2d.js +19 -0
- package/dist/world2d/system-adapters-2d.d.ts +16 -0
- package/dist/world2d/system-adapters-2d.d.ts.map +1 -0
- package/dist/world2d/system-adapters-2d.js +37 -0
- package/dist/world2d/transform-writer-2d.d.ts +16 -0
- package/dist/world2d/transform-writer-2d.d.ts.map +1 -0
- package/dist/world2d/transform-writer-2d.js +22 -0
- package/dist/world2d/types.d.ts +59 -0
- package/dist/world2d/types.d.ts.map +1 -0
- package/dist/world2d/types.js +1 -0
- package/package.json +1 -1
- package/schemas/vgai-game.schema.json +63 -0
- package/src/manifest/load.ts +7 -0
- package/src/manifest/schema.ts +58 -0
- package/src/world3d-react/r3f-adapter.tsx +8 -8
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Vec2Schema } from './tuples2d';
|
|
3
|
+
/**
|
|
4
|
+
* `sprite` authored section — engine-owned 2D sprite data, NOT a `PIXI.Sprite`.
|
|
5
|
+
*
|
|
6
|
+
* Per ARCHITECTURE.md §Render Surfaces: authored data says `sprite`, and a runtime
|
|
7
|
+
* adapter instantiates it onto the appropriate backend (here, a `PIXI.Sprite` on
|
|
8
|
+
* the world2d surface). A 1x1 white texture is used when `texture` is omitted, so a
|
|
9
|
+
* tinted rectangle sprite needs no asset.
|
|
10
|
+
*/
|
|
11
|
+
export const SpriteSchema = z
|
|
12
|
+
.object({
|
|
13
|
+
texture: z
|
|
14
|
+
.string()
|
|
15
|
+
.optional()
|
|
16
|
+
.describe('Texture asset URL (loaded via PIXI.Assets). Omit for a tintable 1x1 white texture'),
|
|
17
|
+
frame: z
|
|
18
|
+
.string()
|
|
19
|
+
.optional()
|
|
20
|
+
.describe('Spritesheet frame/sub-texture name when `texture` is a spritesheet atlas'),
|
|
21
|
+
anchor: Vec2Schema.optional().describe('Normalized anchor [x, y] (0..1). Default [0.5, 0.5]'),
|
|
22
|
+
tint: z
|
|
23
|
+
.string()
|
|
24
|
+
.optional()
|
|
25
|
+
.describe("Tint color as hex string (e.g. '#ff8800'). Default white"),
|
|
26
|
+
alpha: z.number().min(0).max(1).optional().describe('Opacity 0..1. Default 1'),
|
|
27
|
+
width: z
|
|
28
|
+
.number()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe('Explicit display width in pixels (overrides texture size)'),
|
|
31
|
+
height: z
|
|
32
|
+
.number()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe('Explicit display height in pixels (overrides texture size)'),
|
|
35
|
+
blendMode: z
|
|
36
|
+
.enum(['normal', 'add', 'multiply', 'screen'])
|
|
37
|
+
.optional()
|
|
38
|
+
.describe('PixiJS blend mode. Default normal'),
|
|
39
|
+
interactive: z
|
|
40
|
+
.boolean()
|
|
41
|
+
.optional()
|
|
42
|
+
.describe('Enable federated pointer events (eventMode=static) so this sprite can be picked'),
|
|
43
|
+
filter: z
|
|
44
|
+
.enum(['none', 'blur', 'desaturate'])
|
|
45
|
+
.optional()
|
|
46
|
+
.describe('Apply a PixiJS filter (BlurFilter / ColorMatrix desaturate). Default none'),
|
|
47
|
+
animationFrames: z
|
|
48
|
+
.number()
|
|
49
|
+
.int()
|
|
50
|
+
.optional()
|
|
51
|
+
.describe('If set, build an AnimatedSprite cycling N generated tinted frames'),
|
|
52
|
+
fps: z.number().optional().describe('AnimatedSprite playback speed in frames/sec. Default 8'),
|
|
53
|
+
})
|
|
54
|
+
.describe('2D sprite appearance (world2d). Instantiated as a PIXI.Sprite or AnimatedSprite');
|
|
55
|
+
/** `text` authored section — a world-space PIXI.Text label (world-space UI). */
|
|
56
|
+
export const Text2DSchema = z
|
|
57
|
+
.object({
|
|
58
|
+
text: z.string().describe('The string to display'),
|
|
59
|
+
fontSize: z.number().optional().describe('Font size in pixels. Default 24'),
|
|
60
|
+
fill: z.string().optional().describe("Text color as hex string. Default '#ffffff'"),
|
|
61
|
+
anchor: Vec2Schema.optional().describe('Normalized anchor [x, y] (0..1). Default [0.5, 0.5]'),
|
|
62
|
+
})
|
|
63
|
+
.describe('2D world-space text label (world2d). Instantiated as a PIXI.Text');
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* `tilemap` authored section — engine-owned 2D tilemap data (NOT a CompositeTilemap),
|
|
4
|
+
* instantiated to a `@pixi/tilemap` CompositeTilemap by the 2D spawn path. Asset-light:
|
|
5
|
+
* a `palette` of hex colors generates one tile texture each, and `tiles` is a row-major
|
|
6
|
+
* grid of palette indices. A real tileset texture/Tiled `.tmj` import is the natural
|
|
7
|
+
* extension (per the spec's optional Tiled note).
|
|
8
|
+
*/
|
|
9
|
+
export declare const TilemapSchema: z.ZodObject<{
|
|
10
|
+
tileSize: z.ZodNumber;
|
|
11
|
+
palette: z.ZodArray<z.ZodString>;
|
|
12
|
+
tiles: z.ZodArray<z.ZodArray<z.ZodNumber>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type SceneTilemap = z.infer<typeof TilemapSchema>;
|
|
15
|
+
//# sourceMappingURL=tilemap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tilemap.d.ts","sourceRoot":"","sources":["../../../src/world2d/schema/tilemap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,aAAa;;;;iBAU2D,CAAC;AAEtF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* `tilemap` authored section — engine-owned 2D tilemap data (NOT a CompositeTilemap),
|
|
4
|
+
* instantiated to a `@pixi/tilemap` CompositeTilemap by the 2D spawn path. Asset-light:
|
|
5
|
+
* a `palette` of hex colors generates one tile texture each, and `tiles` is a row-major
|
|
6
|
+
* grid of palette indices. A real tileset texture/Tiled `.tmj` import is the natural
|
|
7
|
+
* extension (per the spec's optional Tiled note).
|
|
8
|
+
*/
|
|
9
|
+
export const TilemapSchema = z
|
|
10
|
+
.object({
|
|
11
|
+
tileSize: z.number().describe('Tile width/height in pixels'),
|
|
12
|
+
palette: z
|
|
13
|
+
.array(z.string())
|
|
14
|
+
.describe('Hex colors; one generated tile texture per entry (index → color)'),
|
|
15
|
+
tiles: z
|
|
16
|
+
.array(z.array(z.number().int()))
|
|
17
|
+
.describe('Row-major grid of palette indices (each row is an array of tile indices)'),
|
|
18
|
+
})
|
|
19
|
+
.describe('2D tilemap (world2d). Instantiated as a @pixi/tilemap CompositeTilemap');
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** 2D vector as [x, y]. The world2d analog of the 3D Vec3. */
|
|
3
|
+
export declare const Vec2Schema: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
4
|
+
export type Vec2 = z.infer<typeof Vec2Schema>;
|
|
5
|
+
/**
|
|
6
|
+
* 2D local transform — the world2d analog of the 3D TransformSchema.
|
|
7
|
+
*
|
|
8
|
+
* Orientation is a single scalar `rotation` (radians, about the screen Z axis),
|
|
9
|
+
* NOT a quaternion: PixiJS display objects rotate in the plane. The runtime/editor
|
|
10
|
+
* neutral `Transform` tuple (position[3]/quaternion[4]/scale[3]) maps onto this as
|
|
11
|
+
* z = 0 and rotation about Z (see PIXI-WORLD2D-MAXIMAL-SPEC model-transform2d-section).
|
|
12
|
+
*/
|
|
13
|
+
export declare const Transform2DSchema: z.ZodObject<{
|
|
14
|
+
position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
15
|
+
rotation: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
17
|
+
pivot: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type SceneTransform2D = z.infer<typeof Transform2DSchema>;
|
|
20
|
+
//# sourceMappingURL=tuples2d.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tuples2d.d.ts","sourceRoot":"","sources":["../../../src/world2d/schema/tuples2d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8DAA8D;AAC9D,eAAO,MAAM,UAAU,8CAAoE,CAAC;AAE5F,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9C;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB;;;;;iBAOwC,CAAC;AAEvE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** 2D vector as [x, y]. The world2d analog of the 3D Vec3. */
|
|
3
|
+
export const Vec2Schema = z.tuple([z.number(), z.number()]).describe('2D vector as [x, y]');
|
|
4
|
+
/**
|
|
5
|
+
* 2D local transform — the world2d analog of the 3D TransformSchema.
|
|
6
|
+
*
|
|
7
|
+
* Orientation is a single scalar `rotation` (radians, about the screen Z axis),
|
|
8
|
+
* NOT a quaternion: PixiJS display objects rotate in the plane. The runtime/editor
|
|
9
|
+
* neutral `Transform` tuple (position[3]/quaternion[4]/scale[3]) maps onto this as
|
|
10
|
+
* z = 0 and rotation about Z (see PIXI-WORLD2D-MAXIMAL-SPEC model-transform2d-section).
|
|
11
|
+
*/
|
|
12
|
+
export const Transform2DSchema = z
|
|
13
|
+
.object({
|
|
14
|
+
position: Vec2Schema.optional().describe('Local position [x, y] in world2d pixels'),
|
|
15
|
+
rotation: z.number().optional().describe('Rotation in radians about the Z axis. Default 0'),
|
|
16
|
+
scale: Vec2Schema.optional().describe('Scale per axis [x, y]. Default [1, 1]'),
|
|
17
|
+
pivot: Vec2Schema.optional().describe('Local pivot point [x, y] (center of rotation/scale)'),
|
|
18
|
+
})
|
|
19
|
+
.describe('2D local transform relative to parent (world2d surface)');
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Container } from 'pixi.js';
|
|
2
|
+
import type { Physics2DRegistry } from './physics2d-registry';
|
|
3
|
+
/**
|
|
4
|
+
* PhysicsAdapter2D — the world2d analog of the 3D PhysicsAdapter (rapier-physics-adapter).
|
|
5
|
+
* Lets the editor coordinate editing of a Rapier-2D-driven entity WITHOUT owning the
|
|
6
|
+
* simulation: report transform ownership, then freeze → commit → unfreeze so a drag
|
|
7
|
+
* sticks instead of being stomped by the next physics step.
|
|
8
|
+
*/
|
|
9
|
+
export interface PhysicsAdapter2D {
|
|
10
|
+
ownerOf(display: Container): 'physics' | 'none';
|
|
11
|
+
freeze(display: Container): void;
|
|
12
|
+
commit(display: Container, position: [number, number], rotation: number): void;
|
|
13
|
+
unfreeze(display: Container): void;
|
|
14
|
+
}
|
|
15
|
+
export declare function createPhysicsAdapter2D(physics: Physics2DRegistry): PhysicsAdapter2D;
|
|
16
|
+
//# sourceMappingURL=system-adapters-2d.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-adapters-2d.d.ts","sourceRoot":"","sources":["../../src/world2d/system-adapters-2d.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;IAChD,MAAM,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/E,QAAQ,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI,CAAC;CACpC;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,CAgCnF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export function createPhysicsAdapter2D(physics) {
|
|
2
|
+
// Remember each frozen body's prior type so unfreeze restores it.
|
|
3
|
+
const frozen = new WeakMap();
|
|
4
|
+
return {
|
|
5
|
+
ownerOf(display) {
|
|
6
|
+
const refs = physics.get(display);
|
|
7
|
+
if (!refs)
|
|
8
|
+
return 'none';
|
|
9
|
+
return refs.body.isDynamic() || refs.body.isKinematic() ? 'physics' : 'none';
|
|
10
|
+
},
|
|
11
|
+
freeze(display) {
|
|
12
|
+
const refs = physics.get(display);
|
|
13
|
+
if (!refs)
|
|
14
|
+
return;
|
|
15
|
+
frozen.set(display, refs.body.bodyType());
|
|
16
|
+
// Kinematic-position bodies hold a pose without being driven by forces.
|
|
17
|
+
refs.body.setBodyType(2 /* KinematicPositionBased */, true);
|
|
18
|
+
},
|
|
19
|
+
commit(display, position, rotation) {
|
|
20
|
+
const refs = physics.get(display);
|
|
21
|
+
if (!refs)
|
|
22
|
+
return;
|
|
23
|
+
refs.body.setTranslation({ x: position[0], y: position[1] }, true);
|
|
24
|
+
refs.body.setRotation(rotation, true);
|
|
25
|
+
},
|
|
26
|
+
unfreeze(display) {
|
|
27
|
+
const refs = physics.get(display);
|
|
28
|
+
if (!refs)
|
|
29
|
+
return;
|
|
30
|
+
const prior = frozen.get(display);
|
|
31
|
+
if (prior !== undefined) {
|
|
32
|
+
refs.body.setBodyType(prior, true);
|
|
33
|
+
frozen.delete(display);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Physics2DRegistry } from './physics2d-registry';
|
|
2
|
+
/**
|
|
3
|
+
* Build the single postPhysics transform writer for world2d — the ~5-line 2D
|
|
4
|
+
* analog of `createTransformWriter`.
|
|
5
|
+
*
|
|
6
|
+
* Rapier 2D reports `translation()` as `{x, y}` and `rotation()` as a SCALAR angle
|
|
7
|
+
* (radians), so the writeback is simply `display.position.set(x, y)` +
|
|
8
|
+
* `display.rotation = angle`. Scale is left untouched (Rapier carries no scale).
|
|
9
|
+
*
|
|
10
|
+
* Bodies are simulated in world2d pixel space directly (the surface uses a
|
|
11
|
+
* y-down, pixel-unit world), so no unit conversion is needed; parented entities
|
|
12
|
+
* are kept flat under the world container by the loader, mirroring the 3D writer's
|
|
13
|
+
* scene-root fast path.
|
|
14
|
+
*/
|
|
15
|
+
export declare function createTransformWriter2D(physics: Physics2DRegistry): () => void;
|
|
16
|
+
//# sourceMappingURL=transform-writer-2d.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform-writer-2d.d.ts","sourceRoot":"","sources":["../../src/world2d/transform-writer-2d.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,iBAAiB,SAC3B,IAAI,CAO1C"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build the single postPhysics transform writer for world2d — the ~5-line 2D
|
|
3
|
+
* analog of `createTransformWriter`.
|
|
4
|
+
*
|
|
5
|
+
* Rapier 2D reports `translation()` as `{x, y}` and `rotation()` as a SCALAR angle
|
|
6
|
+
* (radians), so the writeback is simply `display.position.set(x, y)` +
|
|
7
|
+
* `display.rotation = angle`. Scale is left untouched (Rapier carries no scale).
|
|
8
|
+
*
|
|
9
|
+
* Bodies are simulated in world2d pixel space directly (the surface uses a
|
|
10
|
+
* y-down, pixel-unit world), so no unit conversion is needed; parented entities
|
|
11
|
+
* are kept flat under the world container by the loader, mirroring the 3D writer's
|
|
12
|
+
* scene-root fast path.
|
|
13
|
+
*/
|
|
14
|
+
export function createTransformWriter2D(physics) {
|
|
15
|
+
return function writeTransforms2D() {
|
|
16
|
+
for (const [display, { body }] of physics.entries()) {
|
|
17
|
+
const t = body.translation();
|
|
18
|
+
display.position.set(t.x, t.y);
|
|
19
|
+
display.rotation = body.rotation();
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type RAPIER from '@dimforge/rapier2d-compat';
|
|
2
|
+
import type { Application, Container } from 'pixi.js';
|
|
3
|
+
import type { z } from 'zod';
|
|
4
|
+
import type { createSystemRunner } from '../core/system-runner';
|
|
5
|
+
import type { SystemPhaseName } from '../core/types';
|
|
6
|
+
import type { ComponentManager } from '../ecs/component-manager';
|
|
7
|
+
import type { GameComponent } from '../ecs/game-component';
|
|
8
|
+
import type { Game } from '../runtime/game';
|
|
9
|
+
import type { Collision2DSystem } from './collision-2d';
|
|
10
|
+
import type { Physics2DRegistry } from './physics2d-registry';
|
|
11
|
+
/**
|
|
12
|
+
* All world2d subsystems, passed to every world2d `setup(ctx)` and to each
|
|
13
|
+
* `GameComponent<'pixijs'>` lifecycle method — the 2D analog of `GameContext`.
|
|
14
|
+
*
|
|
15
|
+
* Raw libraries (call directly, no wrappers): `app` / `stage` (PixiJS),
|
|
16
|
+
* `rapier2dWorld` / `rapier2d` (Rapier 2D). Engine handles bridge them into the
|
|
17
|
+
* SAME phase-ordered loop the 3D path uses (`systems` is the very same
|
|
18
|
+
* `createSystemRunner`, and `PHASE_ORDER` is shared).
|
|
19
|
+
*/
|
|
20
|
+
export interface World2DContext {
|
|
21
|
+
/** The PixiJS application. Its renderer draws `stage`; auto-ticker is disabled. */
|
|
22
|
+
app: Application;
|
|
23
|
+
/** The world2d scene-graph root (the camera/world container under app.stage). */
|
|
24
|
+
stage: Container;
|
|
25
|
+
/** The Rapier 2D physics `World`. One shared world per world2d scene. */
|
|
26
|
+
rapier2dWorld: RAPIER.World;
|
|
27
|
+
/** The Rapier 2D module namespace (RigidBodyDesc, ColliderDesc, Vector2, …). */
|
|
28
|
+
rapier2d: typeof RAPIER;
|
|
29
|
+
/** `Container ↔ Rapier2D body/collider` registry (+ collider→entity reverse index). */
|
|
30
|
+
physics2d: Physics2DRegistry;
|
|
31
|
+
/** Rapier 2D collision/trigger event dispatcher; drained each postPhysics. */
|
|
32
|
+
collisions2d: Collision2DSystem;
|
|
33
|
+
/** Manager for all live GameComponent instances in this pixi world — the
|
|
34
|
+
* unified `ComponentManager` (`ecs/component-manager.ts`, constructed with
|
|
35
|
+
* `{ kind: 'pixijs' }`). The world2d-silo-only manager this replaced
|
|
36
|
+
* (T7.3) is deleted; every 2D component attaches here, exactly like a
|
|
37
|
+
* threejs component attaches onto its world's manager. */
|
|
38
|
+
components: ComponentManager;
|
|
39
|
+
/** The phase-ordered system runner (shared with the 3D path). */
|
|
40
|
+
systems: ReturnType<typeof createSystemRunner>;
|
|
41
|
+
/**
|
|
42
|
+
* The shared Game root when this world is mounted by a first-party host.
|
|
43
|
+
* This is the cross-world data path: a Pixi component can query gameplay
|
|
44
|
+
* components owned by a sibling Three.js world without a mirror store or a
|
|
45
|
+
* bespoke synchronization bridge.
|
|
46
|
+
*/
|
|
47
|
+
game?: Game | undefined;
|
|
48
|
+
}
|
|
49
|
+
/** Constructor type for `GameComponent<'pixijs'>` subclasses used in a world2d
|
|
50
|
+
* registry (carries static phase/schema) — the 2D-registry analog of
|
|
51
|
+
* `GameComponentClass` (`ecs/game-component.ts`), narrowed to the pixijs kind
|
|
52
|
+
* so `new Cls()` returns a properly-typed `GameComponent<'pixijs'>` without a cast. */
|
|
53
|
+
export type Pixi2DComponentClass = (new () => GameComponent<'pixijs'>) & {
|
|
54
|
+
phase?: SystemPhaseName;
|
|
55
|
+
schema?: z.ZodObject<z.ZodRawShape>;
|
|
56
|
+
};
|
|
57
|
+
/** Component registry for world2d — a plain name→class map (the 2D analog). */
|
|
58
|
+
export type Component2DRegistry = Record<string, Pixi2DComponentClass>;
|
|
59
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/world2d/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,mFAAmF;IACnF,GAAG,EAAE,WAAW,CAAC;IACjB,iFAAiF;IACjF,KAAK,EAAE,SAAS,CAAC;IACjB,yEAAyE;IACzE,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC;IAC5B,gFAAgF;IAChF,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,uFAAuF;IACvF,SAAS,EAAE,iBAAiB,CAAC;IAC7B,8EAA8E;IAC9E,YAAY,EAAE,iBAAiB,CAAC;IAChC;;;;+DAI2D;IAC3D,UAAU,EAAE,gBAAgB,CAAC;IAC7B,iEAAiE;IACjE,OAAO,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC/C;;;;;OAKG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CACzB;AAED;;;wFAGwF;AACxF,MAAM,MAAM,oBAAoB,GAAG,CAAC,UAAU,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG;IACvE,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;CACrC,CAAC;AAEF,+EAA+E;AAC/E,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@vgai/engine",
|
|
3
3
|
"author": "Volter AI, Inc.",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"version": "0.5.0
|
|
5
|
+
"version": "0.5.0",
|
|
6
6
|
"description": "Readable TypeScript game engine and universal host for Three.js, PixiJS, and React games.",
|
|
7
7
|
"keywords": ["game-engine", "three.js", "pixijs", "react", "ai-agents"],
|
|
8
8
|
"type": "module",
|
|
@@ -403,6 +403,69 @@
|
|
|
403
403
|
"maximum": 9007199254740991
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
+
},
|
|
407
|
+
"learn": {
|
|
408
|
+
"description": "Optional learner-facing metadata (FT-5) — set on shipped example projects so the gallery/wizard/Learn-catalog registries can be generated from the manifest itself",
|
|
409
|
+
"type": "object",
|
|
410
|
+
"properties": {
|
|
411
|
+
"kind": {
|
|
412
|
+
"type": "string",
|
|
413
|
+
"enum": [
|
|
414
|
+
"starter",
|
|
415
|
+
"feature",
|
|
416
|
+
"sample-game",
|
|
417
|
+
"lesson-companion"
|
|
418
|
+
],
|
|
419
|
+
"description": "Content kind in the FTUE taxonomy (§3): starter (minimal per-genre starting point), feature (demonstrates a subsystem), sample-game (complete game as an architectural reference), lesson-companion (exists to back a Learn-site lesson)"
|
|
420
|
+
},
|
|
421
|
+
"title": {
|
|
422
|
+
"type": "string",
|
|
423
|
+
"minLength": 1,
|
|
424
|
+
"description": "Learner-facing display title (gallery card headline)"
|
|
425
|
+
},
|
|
426
|
+
"summary": {
|
|
427
|
+
"type": "string",
|
|
428
|
+
"minLength": 1,
|
|
429
|
+
"description": "One-sentence learner-facing summary (gallery card body)"
|
|
430
|
+
},
|
|
431
|
+
"difficulty": {
|
|
432
|
+
"type": "string",
|
|
433
|
+
"enum": [
|
|
434
|
+
"beginner",
|
|
435
|
+
"intermediate",
|
|
436
|
+
"advanced"
|
|
437
|
+
],
|
|
438
|
+
"description": "Learner-facing difficulty rating"
|
|
439
|
+
},
|
|
440
|
+
"features": {
|
|
441
|
+
"type": "array",
|
|
442
|
+
"items": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
|
|
445
|
+
},
|
|
446
|
+
"description": "Short kebab-case feature tags used as gallery/catalog filter facets"
|
|
447
|
+
},
|
|
448
|
+
"thumbnail": {
|
|
449
|
+
"description": "Optional thumbnail image reference (engine-repo-relative, e.g. docs/example-screenshots/<id>/<shot>.png; generated per FT-11, never hand-made)",
|
|
450
|
+
"type": "string"
|
|
451
|
+
},
|
|
452
|
+
"preview": {
|
|
453
|
+
"description": "Optional short preview video/loop reference (generated per FT-11)",
|
|
454
|
+
"type": "string"
|
|
455
|
+
},
|
|
456
|
+
"lesson": {
|
|
457
|
+
"description": "Optional Learn-site lesson URL that teaches this project 1:1 (e.g. https://vgai-learn.pages.dev/quick-starts/joints/)",
|
|
458
|
+
"type": "string"
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
"required": [
|
|
462
|
+
"kind",
|
|
463
|
+
"title",
|
|
464
|
+
"summary",
|
|
465
|
+
"difficulty",
|
|
466
|
+
"features"
|
|
467
|
+
],
|
|
468
|
+
"additionalProperties": false
|
|
406
469
|
}
|
|
407
470
|
},
|
|
408
471
|
"required": [
|
package/src/manifest/load.ts
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
type GameManifest,
|
|
19
19
|
GameManifestSchema,
|
|
20
20
|
type IngestStrategy,
|
|
21
|
+
type LearnMetadata,
|
|
21
22
|
type RootAdapter,
|
|
22
23
|
type Tier,
|
|
23
24
|
} from './schema';
|
|
@@ -132,6 +133,11 @@ export interface ResolvedGameManifest {
|
|
|
132
133
|
readonly maxTriangles?: number | undefined;
|
|
133
134
|
}
|
|
134
135
|
| undefined;
|
|
136
|
+
/** FT-5 (docs/FTUE-LEARN-SYSTEM-DESIGN.md §3) — learner-facing metadata on
|
|
137
|
+
* shipped example projects; read by the editor server's registry surface
|
|
138
|
+
* (`GET /__editor/examples`, packages/editor/server/editor-server.ts) to
|
|
139
|
+
* generate the gallery/wizard/Learn-catalog registries. */
|
|
140
|
+
readonly learn: LearnMetadata | undefined;
|
|
135
141
|
}
|
|
136
142
|
|
|
137
143
|
// ---------------------------------------------------------------------------
|
|
@@ -441,5 +447,6 @@ export function loadGameManifest(raw: unknown): ResolvedGameManifest {
|
|
|
441
447
|
debug: manifest.debug,
|
|
442
448
|
determinism: manifest.determinism,
|
|
443
449
|
budget: manifest.budget,
|
|
450
|
+
learn: manifest.learn,
|
|
444
451
|
};
|
|
445
452
|
}
|
package/src/manifest/schema.ts
CHANGED
|
@@ -315,6 +315,60 @@ export const AdapterRootSchema = z
|
|
|
315
315
|
.strict();
|
|
316
316
|
export type AdapterRoot = z.infer<typeof AdapterRootSchema>;
|
|
317
317
|
|
|
318
|
+
// ---------------------------------------------------------------------------
|
|
319
|
+
// Learn metadata (FT-5, docs/FTUE-LEARN-SYSTEM-DESIGN.md §3)
|
|
320
|
+
// ---------------------------------------------------------------------------
|
|
321
|
+
|
|
322
|
+
export const LearnKindSchema = z
|
|
323
|
+
.enum(['starter', 'feature', 'sample-game', 'lesson-companion'])
|
|
324
|
+
.describe(
|
|
325
|
+
'Content kind in the FTUE taxonomy (§3): starter (minimal per-genre starting point), ' +
|
|
326
|
+
'feature (demonstrates a subsystem), sample-game (complete game as an architectural ' +
|
|
327
|
+
'reference), lesson-companion (exists to back a Learn-site lesson)',
|
|
328
|
+
);
|
|
329
|
+
export type LearnKind = z.infer<typeof LearnKindSchema>;
|
|
330
|
+
|
|
331
|
+
export const LearnDifficultySchema = z
|
|
332
|
+
.enum(['beginner', 'intermediate', 'advanced'])
|
|
333
|
+
.describe('Learner-facing difficulty rating');
|
|
334
|
+
export type LearnDifficulty = z.infer<typeof LearnDifficultySchema>;
|
|
335
|
+
|
|
336
|
+
export const LearnMetadataSchema = z
|
|
337
|
+
.object({
|
|
338
|
+
kind: LearnKindSchema,
|
|
339
|
+
title: z.string().min(1).describe('Learner-facing display title (gallery card headline)'),
|
|
340
|
+
summary: z.string().min(1).describe('One-sentence learner-facing summary (gallery card body)'),
|
|
341
|
+
difficulty: LearnDifficultySchema,
|
|
342
|
+
features: z
|
|
343
|
+
.array(z.string().regex(/^[a-z0-9]+(-[a-z0-9]+)*$/, 'features tags must be kebab-case'))
|
|
344
|
+
.describe('Short kebab-case feature tags used as gallery/catalog filter facets'),
|
|
345
|
+
thumbnail: z
|
|
346
|
+
.string()
|
|
347
|
+
.optional()
|
|
348
|
+
.describe(
|
|
349
|
+
'Optional thumbnail image reference (engine-repo-relative, e.g. ' +
|
|
350
|
+
'docs/example-screenshots/<id>/<shot>.png; generated per FT-11, never hand-made)',
|
|
351
|
+
),
|
|
352
|
+
preview: z
|
|
353
|
+
.string()
|
|
354
|
+
.optional()
|
|
355
|
+
.describe('Optional short preview video/loop reference (generated per FT-11)'),
|
|
356
|
+
lesson: z
|
|
357
|
+
.string()
|
|
358
|
+
.optional()
|
|
359
|
+
.describe(
|
|
360
|
+
'Optional Learn-site lesson URL that teaches this project 1:1 ' +
|
|
361
|
+
'(e.g. https://vgai-learn.pages.dev/quick-starts/joints/)',
|
|
362
|
+
),
|
|
363
|
+
})
|
|
364
|
+
.strict()
|
|
365
|
+
.describe(
|
|
366
|
+
'Learner-facing metadata (FT-5, docs/FTUE-LEARN-SYSTEM-DESIGN.md §3) — powers the example ' +
|
|
367
|
+
'gallery, New Project wizard, and Learn-site catalog. Registries are generated from this ' +
|
|
368
|
+
'block; there is no parallel hand-edited catalog.',
|
|
369
|
+
);
|
|
370
|
+
export type LearnMetadata = z.infer<typeof LearnMetadataSchema>;
|
|
371
|
+
|
|
318
372
|
// ---------------------------------------------------------------------------
|
|
319
373
|
// Game manifest (vgai.game.json)
|
|
320
374
|
// ---------------------------------------------------------------------------
|
|
@@ -540,6 +594,10 @@ export const GameManifestSchema = z
|
|
|
540
594
|
'profiler and fails (nonzero exit) when any metric here is exceeded. Only ' +
|
|
541
595
|
'headlessly-measurable metrics are budgetable; real GPU frame time is not (SwiftShader).',
|
|
542
596
|
),
|
|
597
|
+
learn: LearnMetadataSchema.optional().describe(
|
|
598
|
+
'Optional learner-facing metadata (FT-5) — set on shipped example projects so the ' +
|
|
599
|
+
'gallery/wizard/Learn-catalog registries can be generated from the manifest itself',
|
|
600
|
+
),
|
|
543
601
|
})
|
|
544
602
|
.strict()
|
|
545
603
|
.describe('Game manifest (vgai.game.json) — the complete v2 project configuration');
|
|
@@ -258,14 +258,14 @@ export function createR3FAdapter(options: CreateR3FAdapterOptions): GameAdapter
|
|
|
258
258
|
|
|
259
259
|
return {
|
|
260
260
|
kind: 'threejs',
|
|
261
|
-
// Fiber's REAL `THREE.Scene`/`THREE.Camera
|
|
262
|
-
//
|
|
263
|
-
//
|
|
264
|
-
// editor's
|
|
265
|
-
//
|
|
266
|
-
// type (`Camera = (OrthographicCamera |
|
|
267
|
-
// manual?: boolean }`) is a structural subtype
|
|
268
|
-
// no cast is needed.
|
|
261
|
+
// Fiber's REAL `THREE.Scene`/`THREE.Camera`. Checkout development
|
|
262
|
+
// dedupes `three`; a registry-installed project and the prebundled
|
|
263
|
+
// editor can legitimately have distinct constructor identities, so
|
|
264
|
+
// editor boundaries recognize Three's stable structural brands
|
|
265
|
+
// (`isScene`, `isCamera`) rather than relying only on `instanceof`.
|
|
266
|
+
// `state.camera`'s type (`Camera = (OrthographicCamera |
|
|
267
|
+
// PerspectiveCamera) & { manual?: boolean }`) is a structural subtype
|
|
268
|
+
// of `THREE.Camera`, so no cast is needed.
|
|
269
269
|
scene: state.scene,
|
|
270
270
|
camera: state.camera,
|
|
271
271
|
drivesOwnLoop: false,
|