@vgai/engine 0.5.15 → 0.5.17
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-module.d.ts +229 -33
- package/dist/adapter/adapter-module.d.ts.map +1 -1
- package/dist/adapter/adapter-module.js +222 -50
- package/dist/adapter/authoring-seam-contract.d.ts +530 -0
- package/dist/adapter/authoring-seam-contract.d.ts.map +1 -0
- package/dist/adapter/authoring-seam-contract.js +162 -0
- package/dist/adapter/authoring.d.ts +237 -50
- package/dist/adapter/authoring.d.ts.map +1 -1
- package/dist/adapter/authoring.js +2 -1
- package/dist/adapter/entrypoint-selection-source.d.ts +35 -0
- package/dist/adapter/entrypoint-selection-source.d.ts.map +1 -0
- package/dist/adapter/entrypoint-selection-source.js +151 -0
- package/dist/adapter/finders/scenes-from-entrypoint-selection.d.ts +7 -3
- package/dist/adapter/finders/scenes-from-entrypoint-selection.d.ts.map +1 -1
- package/dist/adapter/finders/scenes-from-entrypoint-selection.js +145 -27
- package/dist/adapter/first-party-systems.d.ts +13 -3
- package/dist/adapter/first-party-systems.d.ts.map +1 -1
- package/dist/adapter/first-party-systems.js +10 -3
- package/dist/adapter/index.d.ts +7 -2
- package/dist/adapter/index.d.ts.map +1 -1
- package/dist/adapter/index.js +4 -0
- package/dist/adapter/ingest/contract-system-adapters.d.ts +1 -1
- package/dist/adapter/ingest/contract-system-adapters.d.ts.map +1 -1
- package/dist/adapter/ingest/contract-system-adapters.js +13 -25
- package/dist/adapter/ingest/game-contract-seams.d.ts +214 -0
- package/dist/adapter/ingest/game-contract-seams.d.ts.map +1 -0
- package/dist/adapter/ingest/game-contract-seams.js +62 -0
- package/dist/adapter/ingest/game-contract.d.ts +5 -3
- package/dist/adapter/ingest/game-contract.d.ts.map +1 -1
- package/dist/adapter/ingest/game-contract.js +4 -1
- package/dist/adapter/ingest/merge-debug-adapters.d.ts +52 -0
- package/dist/adapter/ingest/merge-debug-adapters.d.ts.map +1 -0
- package/dist/adapter/ingest/merge-debug-adapters.js +141 -0
- package/dist/adapter/ingest/observation-debug-adapter.d.ts +56 -0
- package/dist/adapter/ingest/observation-debug-adapter.d.ts.map +1 -0
- package/dist/adapter/ingest/observation-debug-adapter.js +131 -0
- package/dist/adapter/ingest/scene-capture.d.ts +38 -13
- package/dist/adapter/ingest/scene-capture.d.ts.map +1 -1
- package/dist/adapter/ingest/scene-capture.js +101 -24
- package/dist/adapter/ingest/visible-capture-window.d.ts +22 -5
- package/dist/adapter/ingest/visible-capture-window.d.ts.map +1 -1
- package/dist/adapter/ingest/visible-capture-window.js +46 -7
- package/dist/adapter/native-debug-module.d.ts +43 -0
- package/dist/adapter/native-debug-module.d.ts.map +1 -0
- package/dist/adapter/native-debug-module.js +230 -0
- package/dist/adapter/object3d-authoring-subject.d.ts +32 -0
- package/dist/adapter/object3d-authoring-subject.d.ts.map +1 -0
- package/dist/adapter/object3d-authoring-subject.js +25 -0
- package/dist/adapter/root-adapter.d.ts +25 -56
- package/dist/adapter/root-adapter.d.ts.map +1 -1
- package/dist/adapter/root-adapter.js +4 -20
- package/dist/adapter/root-seam-contract.d.ts +129 -0
- package/dist/adapter/root-seam-contract.d.ts.map +1 -0
- package/dist/adapter/root-seam-contract.js +37 -0
- package/dist/adapter/seam-evidence.d.ts +118 -0
- package/dist/adapter/seam-evidence.d.ts.map +1 -0
- package/dist/adapter/seam-evidence.js +231 -0
- package/dist/adapter/setup-three-root-adapter.d.ts +2 -3
- package/dist/adapter/setup-three-root-adapter.d.ts.map +1 -1
- package/dist/adapter/setup-three-root-adapter.js +11 -12
- package/dist/adapter/system-adapter.d.ts +6 -1
- package/dist/adapter/system-adapter.d.ts.map +1 -1
- package/dist/adapter/system-seam-contract.d.ts +354 -0
- package/dist/adapter/system-seam-contract.d.ts.map +1 -0
- package/dist/adapter/system-seam-contract.js +95 -0
- package/dist/animation/xstate-animation-binding.d.ts +6 -0
- package/dist/animation/xstate-animation-binding.d.ts.map +1 -1
- package/dist/animation/xstate-animation-binding.js +142 -4
- package/dist/asset-formats/collider.d.ts +1 -1
- package/dist/asset-formats/mesh.d.ts +2 -2
- package/dist/asset-formats/particles.d.ts +1 -1
- package/dist/canvas-react/engine-bridge.d.ts +6 -6
- package/dist/canvas-react/engine-bridge.d.ts.map +1 -1
- package/dist/canvas-react/engine-bridge.js +2 -2
- package/dist/canvas-react/index.d.ts +2 -2
- package/dist/canvas-react/index.d.ts.map +1 -1
- package/dist/canvas-react/index.js +1 -1
- package/dist/canvas-react/pixi-react-adapter.d.ts +15 -9
- package/dist/canvas-react/pixi-react-adapter.d.ts.map +1 -1
- package/dist/canvas-react/pixi-react-adapter.js +129 -64
- package/dist/canvas-react/pixi-react-root-factory.d.ts.map +1 -1
- package/dist/canvas-react/pixi-react-root-factory.js +4 -0
- package/dist/canvas-react/world-context.d.ts +22 -12
- package/dist/canvas-react/world-context.d.ts.map +1 -1
- package/dist/canvas-react/world-context.js +12 -51
- package/dist/data/curve.d.ts +1 -1
- package/dist/data/curve.js +2 -2
- package/dist/dev/instruments.d.ts +4 -4
- package/dist/dev/instruments.js +4 -4
- package/dist/dev/register-render-vitals.d.ts +2 -2
- package/dist/dev/register-render-vitals.js +2 -2
- package/dist/dev/static-batch-advisor.d.ts +1 -1
- package/dist/dev/static-batch-advisor.js +2 -2
- package/dist/ecs/user-data.d.ts +5 -0
- package/dist/ecs/user-data.d.ts.map +1 -1
- package/dist/ecs/user-data.js +3 -0
- package/dist/input/input-manager.d.ts +64 -0
- package/dist/input/input-manager.d.ts.map +1 -1
- package/dist/input/input-manager.js +149 -0
- package/dist/manifest/load.d.ts +0 -3
- package/dist/manifest/load.d.ts.map +1 -1
- package/dist/manifest/load.js +0 -4
- package/dist/manifest/schema.d.ts +9 -11
- package/dist/manifest/schema.d.ts.map +1 -1
- package/dist/manifest/schema.js +2 -23
- package/dist/pixi/authoring.d.ts +33 -0
- package/dist/pixi/authoring.d.ts.map +1 -1
- package/dist/pixi/authoring.js +301 -2
- package/dist/pixi/ingest.d.ts +2 -1
- package/dist/pixi/ingest.d.ts.map +1 -1
- package/dist/pixi/ingest.js +4 -2
- package/dist/pixi/scene-capture.d.ts +9 -1
- package/dist/pixi/scene-capture.d.ts.map +1 -1
- package/dist/pixi/scene-capture.js +9 -6
- package/dist/react/world-state.d.ts +12 -0
- package/dist/react/world-state.d.ts.map +1 -1
- package/dist/react/world-state.js +14 -0
- package/dist/render/particles-factory.d.ts +13 -6
- package/dist/render/particles-factory.d.ts.map +1 -1
- package/dist/render/particles-factory.js +6 -3
- package/dist/render/soft-particle-depth.d.ts +3 -3
- package/dist/render/soft-particle-depth.d.ts.map +1 -1
- package/dist/render/soft-particle-depth.js +8 -13
- package/dist/runtime/create-runtime.d.ts +25 -62
- package/dist/runtime/create-runtime.d.ts.map +1 -1
- package/dist/runtime/create-runtime.js +58 -105
- package/dist/runtime/dev-build.d.ts +37 -0
- package/dist/runtime/dev-build.d.ts.map +1 -0
- package/dist/runtime/dev-build.js +49 -0
- package/dist/runtime/game.d.ts +38 -72
- package/dist/runtime/game.d.ts.map +1 -1
- package/dist/runtime/game.js +40 -55
- package/dist/runtime/mount-game.d.ts.map +1 -1
- package/dist/runtime/mount-game.js +12 -1
- package/dist/runtime/mount-manifest.d.ts +0 -13
- package/dist/runtime/mount-manifest.d.ts.map +1 -1
- package/dist/runtime/mount-manifest.js +5 -25
- package/dist/runtime/types.d.ts +18 -0
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/setup/setup-renderer.d.ts +3 -4
- package/dist/setup/setup-renderer.d.ts.map +1 -1
- package/dist/setup/setup-renderer.js +3 -4
- package/dist/world3d-react/engine-bridge.d.ts +1 -1
- package/dist/world3d-react/engine-bridge.d.ts.map +1 -1
- package/dist/world3d-react/engine-bridge.js +29 -4
- package/dist/world3d-react/index.d.ts +1 -1
- package/dist/world3d-react/index.js +1 -1
- package/dist/world3d-react/r3f-adapter.d.ts +7 -0
- package/dist/world3d-react/r3f-adapter.d.ts.map +1 -1
- package/dist/world3d-react/r3f-adapter.js +132 -28
- package/dist/world3d-react/r3f-root-factory.d.ts.map +1 -1
- package/dist/world3d-react/r3f-root-factory.js +14 -0
- package/dist/world3d-react/rapier-physics-bridge.d.ts +4 -4
- package/dist/world3d-react/rapier-physics-bridge.js +3 -3
- package/dist/world3d-react/world-context.d.ts +52 -3
- package/dist/world3d-react/world-context.d.ts.map +1 -1
- package/dist/world3d-react/world-context.js +94 -64
- package/dist-config/config.js.map +1 -1
- package/package.json +1 -1
- package/schemas/engine-capabilities.json +8 -8
- package/schemas/vgai-project.schema.json +1 -6
- package/src/adapter/adapter-module.ts +405 -72
- package/src/adapter/authoring-seam-contract.ts +211 -0
- package/src/adapter/authoring.ts +242 -50
- package/src/adapter/entrypoint-selection-source.ts +159 -0
- package/src/adapter/finders/scenes-from-entrypoint-selection.ts +162 -36
- package/src/adapter/first-party-systems.ts +17 -3
- package/src/adapter/index.ts +51 -1
- package/src/adapter/ingest/contract-system-adapters.ts +26 -30
- package/src/adapter/ingest/game-contract-seams.ts +85 -0
- package/src/adapter/ingest/game-contract.ts +9 -4
- package/src/adapter/ingest/merge-debug-adapters.ts +193 -0
- package/src/adapter/ingest/observation-debug-adapter.ts +158 -0
- package/src/adapter/ingest/scene-capture.ts +126 -23
- package/src/adapter/ingest/visible-capture-window.ts +63 -9
- package/src/adapter/native-debug-module.ts +307 -0
- package/src/adapter/object3d-authoring-subject.ts +50 -0
- package/src/adapter/root-adapter.ts +25 -56
- package/src/adapter/root-seam-contract.ts +57 -0
- package/src/adapter/seam-evidence.ts +336 -0
- package/src/adapter/setup-three-root-adapter.ts +13 -15
- package/src/adapter/system-adapter.ts +6 -1
- package/src/adapter/system-seam-contract.ts +121 -0
- package/src/animation/xstate-animation-binding.ts +151 -4
- package/src/canvas-react/engine-bridge.ts +6 -6
- package/src/canvas-react/index.ts +2 -1
- package/src/canvas-react/pixi-react-adapter.tsx +143 -77
- package/src/canvas-react/pixi-react-root-factory.tsx +4 -0
- package/src/canvas-react/world-context.ts +26 -101
- package/src/data/curve.ts +2 -2
- package/src/dev/instruments.ts +4 -4
- package/src/dev/register-render-vitals.ts +2 -2
- package/src/dev/static-batch-advisor.ts +2 -2
- package/src/ecs/user-data.ts +5 -0
- package/src/input/input-manager.ts +145 -0
- package/src/manifest/load.ts +0 -7
- package/src/manifest/schema.ts +2 -25
- package/src/pixi/authoring.ts +329 -2
- package/src/pixi/ingest.ts +9 -2
- package/src/pixi/scene-capture.ts +20 -5
- package/src/react/world-state.tsx +15 -0
- package/src/render/particles-factory.ts +16 -6
- package/src/render/soft-particle-depth.ts +8 -13
- package/src/runtime/create-runtime.ts +79 -158
- package/src/runtime/dev-build.ts +49 -0
- package/src/runtime/game.ts +72 -113
- package/src/runtime/mount-game.ts +19 -1
- package/src/runtime/mount-manifest.ts +5 -37
- package/src/runtime/types.ts +22 -0
- package/src/setup/setup-renderer.ts +3 -4
- package/src/world3d-react/engine-bridge.ts +29 -4
- package/src/world3d-react/index.ts +1 -1
- package/src/world3d-react/r3f-adapter.tsx +140 -31
- package/src/world3d-react/r3f-root-factory.tsx +14 -0
- package/src/world3d-react/rapier-physics-bridge.tsx +4 -4
- package/src/world3d-react/world-context.ts +111 -87
- package/dist/runtime/dev-layers.d.ts +0 -34
- package/dist/runtime/dev-layers.d.ts.map +0 -1
- package/dist/runtime/dev-layers.js +0 -46
- package/src/runtime/dev-layers.ts +0 -46
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE one owner of "are dev layers enabled" (`vgai.project.json`'s `dev: true`
|
|
3
|
-
* root flag). Every reader that has to answer that question calls
|
|
4
|
-
* {@link devLayersEnabled}; there is deliberately NO second source of truth —
|
|
5
|
-
* not a module-level cached boolean, not a `globalThis` flag, not a per-host
|
|
6
|
-
* copy of the `import.meta.env` read below. A dev GUI that ships to players
|
|
7
|
-
* because two places disagreed about what "dev" means is exactly the failure
|
|
8
|
-
* this single owner exists to make impossible.
|
|
9
|
-
*
|
|
10
|
-
* Ownership, stated in one place (the build rule):
|
|
11
|
-
* - OWNER: this function. It resolves the answer; nothing else derives it.
|
|
12
|
-
* - SHARERS: `mountManifestRoots` (the ship gate — a dev root only mounts
|
|
13
|
-
* when this returns true). Any future host that mounts manifest roots
|
|
14
|
-
* itself calls this too, with its own `override`.
|
|
15
|
-
* - TEARDOWN: none. This is a pure predicate over build config and one
|
|
16
|
-
* caller-supplied argument — it owns no resource, allocates nothing, and
|
|
17
|
-
* has no lifecycle to end.
|
|
18
|
-
*
|
|
19
|
-
* The three inputs, highest precedence first:
|
|
20
|
-
* 1. `override` — the explicit per-mount answer. A headless test, a capture
|
|
21
|
-
* harness, or a host that knows better passes `true`/`false` and gets
|
|
22
|
-
* exactly that. Passing `undefined` (or omitting it) means "decide for
|
|
23
|
-
* me" and falls through.
|
|
24
|
-
* 2. A dev build — `import.meta.env.DEV`. The ordinary local/editor case:
|
|
25
|
-
* dev layers are on.
|
|
26
|
-
* 3. A production build's EXPLICIT opt-in — `VITE_VGAI_DEV_LAYERS=true`.
|
|
27
|
-
* Shipping the dev GUI in a production bundle is a real, legitimate
|
|
28
|
-
* choice (an internal playtest build, a QA build), and it must be an
|
|
29
|
-
* opt-in someone had to type, never something a default drifts into.
|
|
30
|
-
*
|
|
31
|
-
* Anything else — a production build with no opt-in — is `false`.
|
|
32
|
-
*/
|
|
33
|
-
export declare function devLayersEnabled(override?: boolean | undefined): boolean;
|
|
34
|
-
//# sourceMappingURL=dev-layers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dev-layers.d.ts","sourceRoot":"","sources":["../../src/runtime/dev-layers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAaxE"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE one owner of "are dev layers enabled" (`vgai.project.json`'s `dev: true`
|
|
3
|
-
* root flag). Every reader that has to answer that question calls
|
|
4
|
-
* {@link devLayersEnabled}; there is deliberately NO second source of truth —
|
|
5
|
-
* not a module-level cached boolean, not a `globalThis` flag, not a per-host
|
|
6
|
-
* copy of the `import.meta.env` read below. A dev GUI that ships to players
|
|
7
|
-
* because two places disagreed about what "dev" means is exactly the failure
|
|
8
|
-
* this single owner exists to make impossible.
|
|
9
|
-
*
|
|
10
|
-
* Ownership, stated in one place (the build rule):
|
|
11
|
-
* - OWNER: this function. It resolves the answer; nothing else derives it.
|
|
12
|
-
* - SHARERS: `mountManifestRoots` (the ship gate — a dev root only mounts
|
|
13
|
-
* when this returns true). Any future host that mounts manifest roots
|
|
14
|
-
* itself calls this too, with its own `override`.
|
|
15
|
-
* - TEARDOWN: none. This is a pure predicate over build config and one
|
|
16
|
-
* caller-supplied argument — it owns no resource, allocates nothing, and
|
|
17
|
-
* has no lifecycle to end.
|
|
18
|
-
*
|
|
19
|
-
* The three inputs, highest precedence first:
|
|
20
|
-
* 1. `override` — the explicit per-mount answer. A headless test, a capture
|
|
21
|
-
* harness, or a host that knows better passes `true`/`false` and gets
|
|
22
|
-
* exactly that. Passing `undefined` (or omitting it) means "decide for
|
|
23
|
-
* me" and falls through.
|
|
24
|
-
* 2. A dev build — `import.meta.env.DEV`. The ordinary local/editor case:
|
|
25
|
-
* dev layers are on.
|
|
26
|
-
* 3. A production build's EXPLICIT opt-in — `VITE_VGAI_DEV_LAYERS=true`.
|
|
27
|
-
* Shipping the dev GUI in a production bundle is a real, legitimate
|
|
28
|
-
* choice (an internal playtest build, a QA build), and it must be an
|
|
29
|
-
* opt-in someone had to type, never something a default drifts into.
|
|
30
|
-
*
|
|
31
|
-
* Anything else — a production build with no opt-in — is `false`.
|
|
32
|
-
*/
|
|
33
|
-
export function devLayersEnabled(override) {
|
|
34
|
-
if (override !== undefined)
|
|
35
|
-
return override;
|
|
36
|
-
// `import.meta` is cast whole, not just its `.env`: this module is reachable
|
|
37
|
-
// from programs whose tsconfig does not pull in `vite/client` (the session
|
|
38
|
-
// client's, for one, which reaches the three adapter transitively), and there
|
|
39
|
-
// `ImportMeta` has no declared `env` at all. The cast keeps the single owner
|
|
40
|
-
// of the dev answer importable from ANY program rather than forcing every
|
|
41
|
-
// downstream tsconfig to adopt Vite's ambient types.
|
|
42
|
-
const env = import.meta.env;
|
|
43
|
-
if (env?.DEV === true)
|
|
44
|
-
return true;
|
|
45
|
-
return env?.VITE_VGAI_DEV_LAYERS === 'true';
|
|
46
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE one owner of "are dev layers enabled" (`vgai.project.json`'s `dev: true`
|
|
3
|
-
* root flag). Every reader that has to answer that question calls
|
|
4
|
-
* {@link devLayersEnabled}; there is deliberately NO second source of truth —
|
|
5
|
-
* not a module-level cached boolean, not a `globalThis` flag, not a per-host
|
|
6
|
-
* copy of the `import.meta.env` read below. A dev GUI that ships to players
|
|
7
|
-
* because two places disagreed about what "dev" means is exactly the failure
|
|
8
|
-
* this single owner exists to make impossible.
|
|
9
|
-
*
|
|
10
|
-
* Ownership, stated in one place (the build rule):
|
|
11
|
-
* - OWNER: this function. It resolves the answer; nothing else derives it.
|
|
12
|
-
* - SHARERS: `mountManifestRoots` (the ship gate — a dev root only mounts
|
|
13
|
-
* when this returns true). Any future host that mounts manifest roots
|
|
14
|
-
* itself calls this too, with its own `override`.
|
|
15
|
-
* - TEARDOWN: none. This is a pure predicate over build config and one
|
|
16
|
-
* caller-supplied argument — it owns no resource, allocates nothing, and
|
|
17
|
-
* has no lifecycle to end.
|
|
18
|
-
*
|
|
19
|
-
* The three inputs, highest precedence first:
|
|
20
|
-
* 1. `override` — the explicit per-mount answer. A headless test, a capture
|
|
21
|
-
* harness, or a host that knows better passes `true`/`false` and gets
|
|
22
|
-
* exactly that. Passing `undefined` (or omitting it) means "decide for
|
|
23
|
-
* me" and falls through.
|
|
24
|
-
* 2. A dev build — `import.meta.env.DEV`. The ordinary local/editor case:
|
|
25
|
-
* dev layers are on.
|
|
26
|
-
* 3. A production build's EXPLICIT opt-in — `VITE_VGAI_DEV_LAYERS=true`.
|
|
27
|
-
* Shipping the dev GUI in a production bundle is a real, legitimate
|
|
28
|
-
* choice (an internal playtest build, a QA build), and it must be an
|
|
29
|
-
* opt-in someone had to type, never something a default drifts into.
|
|
30
|
-
*
|
|
31
|
-
* Anything else — a production build with no opt-in — is `false`.
|
|
32
|
-
*/
|
|
33
|
-
export function devLayersEnabled(override?: boolean | undefined): boolean {
|
|
34
|
-
if (override !== undefined) return override;
|
|
35
|
-
// `import.meta` is cast whole, not just its `.env`: this module is reachable
|
|
36
|
-
// from programs whose tsconfig does not pull in `vite/client` (the session
|
|
37
|
-
// client's, for one, which reaches the three adapter transitively), and there
|
|
38
|
-
// `ImportMeta` has no declared `env` at all. The cast keeps the single owner
|
|
39
|
-
// of the dev answer importable from ANY program rather than forcing every
|
|
40
|
-
// downstream tsconfig to adopt Vite's ambient types.
|
|
41
|
-
const env = (import.meta as unknown as { env?: unknown }).env as
|
|
42
|
-
| { DEV?: boolean | undefined; VITE_VGAI_DEV_LAYERS?: string | undefined }
|
|
43
|
-
| undefined;
|
|
44
|
-
if (env?.DEV === true) return true;
|
|
45
|
-
return env?.VITE_VGAI_DEV_LAYERS === 'true';
|
|
46
|
-
}
|