@vgai/engine 0.5.16 → 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 +1 -16
- package/dist/adapter/adapter-module.d.ts.map +1 -1
- package/dist/adapter/adapter-module.js +1 -11
- package/dist/adapter/finders/scenes-from-entrypoint-selection.d.ts +0 -2
- package/dist/adapter/finders/scenes-from-entrypoint-selection.d.ts.map +1 -1
- package/dist/adapter/finders/scenes-from-entrypoint-selection.js +3 -6
- package/dist/adapter/root-adapter.d.ts +4 -0
- package/dist/adapter/root-adapter.d.ts.map +1 -1
- package/dist/adapter/root-seam-contract.d.ts +5 -0
- package/dist/adapter/root-seam-contract.d.ts.map +1 -1
- package/dist/adapter/root-seam-contract.js +1 -0
- package/dist/adapter/setup-three-root-adapter.js +9 -9
- package/dist/canvas-react/pixi-react-adapter.d.ts.map +1 -1
- package/dist/canvas-react/pixi-react-adapter.js +92 -41
- 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/input/input-manager.d.ts +15 -0
- package/dist/input/input-manager.d.ts.map +1 -1
- package/dist/input/input-manager.js +22 -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 +0 -2
- 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 +86 -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/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 +2 -16
- package/dist/runtime/create-runtime.d.ts.map +1 -1
- package/dist/runtime/create-runtime.js +36 -38
- 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 +9 -1
- package/dist/runtime/game.d.ts.map +1 -1
- package/dist/runtime/game.js +25 -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 +1 -20
- package/dist/world3d-react/engine-bridge.d.ts.map +1 -1
- package/dist/world3d-react/engine-bridge.js +28 -3
- 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.map +1 -1
- package/dist/world3d-react/r3f-adapter.js +89 -14
- package/dist/world3d-react/r3f-root-factory.d.ts.map +1 -1
- package/dist/world3d-react/r3f-root-factory.js +12 -2
- 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 +43 -0
- package/dist/world3d-react/world-context.d.ts.map +1 -1
- package/dist/world3d-react/world-context.js +89 -46
- package/dist-config/config.js.map +1 -1
- package/package.json +1 -1
- package/schemas/engine-capabilities.json +3 -3
- package/schemas/vgai-project.schema.json +1 -6
- package/src/adapter/adapter-module.ts +1 -25
- package/src/adapter/finders/scenes-from-entrypoint-selection.ts +3 -8
- package/src/adapter/root-adapter.ts +4 -0
- package/src/adapter/root-seam-contract.ts +1 -0
- package/src/adapter/setup-three-root-adapter.ts +9 -9
- package/src/canvas-react/pixi-react-adapter.tsx +98 -53
- 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/input/input-manager.ts +23 -0
- package/src/manifest/load.ts +0 -7
- package/src/manifest/schema.ts +2 -25
- package/src/pixi/authoring.ts +98 -6
- package/src/react/world-state.tsx +15 -0
- package/src/render/soft-particle-depth.ts +8 -13
- package/src/runtime/create-runtime.ts +38 -52
- package/src/runtime/dev-build.ts +49 -0
- package/src/runtime/game.ts +31 -2
- package/src/runtime/mount-manifest.ts +1 -32
- package/src/world3d-react/engine-bridge.ts +28 -3
- package/src/world3d-react/index.ts +1 -1
- package/src/world3d-react/r3f-adapter.tsx +87 -18
- package/src/world3d-react/r3f-root-factory.tsx +12 -2
- package/src/world3d-react/rapier-physics-bridge.tsx +4 -4
- package/src/world3d-react/world-context.ts +100 -51
- 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
|
@@ -224,6 +224,21 @@ export declare class InputManager {
|
|
|
224
224
|
* data reaches `isPressed`/`isJustPressed`/`isJustReleased`.
|
|
225
225
|
*/
|
|
226
226
|
loadMap(url: string): Promise<void>;
|
|
227
|
+
/**
|
|
228
|
+
* `loadMap`'s OPTIONAL sibling: apply the map at `url` when the project
|
|
229
|
+
* ships one and report `false` — SILENTLY — when it does not exist.
|
|
230
|
+
*
|
|
231
|
+
* The host loads the conventional map path at mount for every three/canvas
|
|
232
|
+
* root, including the scaffolded shape that has declared no actions yet, so
|
|
233
|
+
* "no map on disk" is the ordinary state of a brand-new project and must not
|
|
234
|
+
* print an error on every boot. Everything else stays exactly as loud as
|
|
235
|
+
* `loadMap`: a map that EXISTS and is malformed (or any non-404 failure)
|
|
236
|
+
* still logs and throws.
|
|
237
|
+
*/
|
|
238
|
+
loadMapIfPresent(url: string): Promise<boolean>;
|
|
239
|
+
/** Shared fetch/validate/apply for {@link loadMap} and
|
|
240
|
+
* {@link loadMapIfPresent}; `optional` decides only what a 404 means. */
|
|
241
|
+
private fetchMap;
|
|
227
242
|
/**
|
|
228
243
|
* F3 — `loadMap`'s synchronous, no-`fetch` sibling: apply an already-in-
|
|
229
244
|
* memory (or freshly-deserialized) input-map DOCUMENT, validated through
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-manager.d.ts","sourceRoot":"","sources":["../../src/input/input-manager.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,OAAO,EACR,MAAM,eAAe,CAAC;AA4BvB;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,IAAI,EAAG,wBAAwB,CAAU;IAClD,QAAQ,CAAC,IAAI,EAAE;QAAE,UAAU,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;gBAE5B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE;CAQjE;AAED;;;;;;;GAOG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,QAAQ,CAAC,IAAI,EAAG,qBAAqB,CAAU;IAC/C,QAAQ,CAAC,IAAI,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;gBAE3B,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;CAQ9C;AA6MD,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAqC;IAKpD,OAAO,CAAC,gBAAgB,CAAsC;IAM9D,OAAO,CAAC,eAAe,CAAqC;IAK5D,OAAO,CAAC,gBAAgB,CAAK;IAC7B,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,UAAU,CAAqB;IACvC,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,oBAAoB,CAAqB;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AAC;QACX,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG;gBAAE,CAAC,EAAE,MAAM,CAAC;gBAAC,CAAC,EAAE,MAAM,CAAA;aAAE,CAAC,CAAA;SAAE,EAAE,CAAC;KACjG;IAID,uDAAuD;IACvD,kBAAkB,CAAC,OAAO,EAAE,WAAW;IAWvC;;;;;;;;;;;OAWG;IACH,eAAe;IAYf,+BAA+B;IAC/B,OAAO;CAoBR"}
|
|
@@ -631,10 +631,31 @@ export class InputManager {
|
|
|
631
631
|
* data reaches `isPressed`/`isJustPressed`/`isJustReleased`.
|
|
632
632
|
*/
|
|
633
633
|
async loadMap(url) {
|
|
634
|
+
await this.fetchMap(url, false);
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* `loadMap`'s OPTIONAL sibling: apply the map at `url` when the project
|
|
638
|
+
* ships one and report `false` — SILENTLY — when it does not exist.
|
|
639
|
+
*
|
|
640
|
+
* The host loads the conventional map path at mount for every three/canvas
|
|
641
|
+
* root, including the scaffolded shape that has declared no actions yet, so
|
|
642
|
+
* "no map on disk" is the ordinary state of a brand-new project and must not
|
|
643
|
+
* print an error on every boot. Everything else stays exactly as loud as
|
|
644
|
+
* `loadMap`: a map that EXISTS and is malformed (or any non-404 failure)
|
|
645
|
+
* still logs and throws.
|
|
646
|
+
*/
|
|
647
|
+
async loadMapIfPresent(url) {
|
|
648
|
+
return this.fetchMap(url, true);
|
|
649
|
+
}
|
|
650
|
+
/** Shared fetch/validate/apply for {@link loadMap} and
|
|
651
|
+
* {@link loadMapIfPresent}; `optional` decides only what a 404 means. */
|
|
652
|
+
async fetchMap(url, optional) {
|
|
634
653
|
let data;
|
|
635
654
|
try {
|
|
636
655
|
const res = await fetch(resolveUrl(url));
|
|
637
656
|
if (!res.ok) {
|
|
657
|
+
if (optional && res.status === 404)
|
|
658
|
+
return false;
|
|
638
659
|
throw new Error(`HTTP ${res.status} ${res.statusText}`);
|
|
639
660
|
}
|
|
640
661
|
const json = await res.json();
|
|
@@ -649,6 +670,7 @@ export class InputManager {
|
|
|
649
670
|
throw err instanceof AssetParseError ? err : new Error(message);
|
|
650
671
|
}
|
|
651
672
|
this.applyParsedMap(data);
|
|
673
|
+
return true;
|
|
652
674
|
}
|
|
653
675
|
/**
|
|
654
676
|
* F3 — `loadMap`'s synchronous, no-`fetch` sibling: apply an already-in-
|
package/dist/manifest/load.d.ts
CHANGED
|
@@ -50,9 +50,6 @@ export interface ResolvedAdapterRoot {
|
|
|
50
50
|
readonly entry: string | undefined;
|
|
51
51
|
readonly zOrder: number;
|
|
52
52
|
readonly pausable: boolean;
|
|
53
|
-
/** `dev: true` — this root is a DEV LAYER, not shipped game content. See
|
|
54
|
-
* `manifest/schema.ts`'s `dev` field for the four readers. */
|
|
55
|
-
readonly dev: boolean;
|
|
56
53
|
readonly loop: 'gated' | 'self-driven';
|
|
57
54
|
}
|
|
58
55
|
export interface ResolvedGameManifest {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/manifest/load.ts"],"names":[],"mappings":"AAeA,OAAO,EAIL,KAAK,aAAa,EAEnB,MAAM,UAAU,CAAC;AAMlB,wCAAwC;AACxC,MAAM,MAAM,eAAe,GACvB;IACE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC9C,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;CAC9C,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,QAAQ,GAAG,KAA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C3C;AAED,uGAAuG;AACvG,eAAO,MAAM,qBAAqB,6BAA6B,CAAC;AAiIhE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,oBAAoB,CA6DnE"}
|
package/dist/manifest/load.js
CHANGED
|
@@ -97,9 +97,6 @@ function checkEngineVersionPin(version) {
|
|
|
97
97
|
* resolution; `entry` drives the entry cross-field rule and is
|
|
98
98
|
* carried through; `zOrder` drives the final sort; `pausable`/`loop` are
|
|
99
99
|
* carried through as-is (their consumers are the runtime/CLI, T3.2/T3.3);
|
|
100
|
-
* `dev` is carried through for the four dev-layer readers (`mountManifestRoots`'s
|
|
101
|
-
* ship gate, the host's topmost stacking pass, the play compositor's capture
|
|
102
|
-
* exclusion, and the editor's chrome-not-content seam);
|
|
103
100
|
* `description` (T3.3
|
|
104
101
|
* slice 3) is carried through as-is — its consumer today is
|
|
105
102
|
* `resolveIngestDescriptor` (packages/editor/src/adapter-resolver.ts), which
|
|
@@ -116,7 +113,6 @@ function resolveRoot(root) {
|
|
|
116
113
|
entry: root.entry,
|
|
117
114
|
zOrder: root.zOrder,
|
|
118
115
|
pausable: root.pausable,
|
|
119
|
-
dev: root.dev,
|
|
120
116
|
loop: root.loop,
|
|
121
117
|
};
|
|
122
118
|
}
|
|
@@ -72,7 +72,6 @@ export declare const AdapterRootSchema: z.ZodObject<{
|
|
|
72
72
|
styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
73
|
zOrder: z.ZodDefault<z.ZodNumber>;
|
|
74
74
|
pausable: z.ZodDefault<z.ZodBoolean>;
|
|
75
|
-
dev: z.ZodDefault<z.ZodBoolean>;
|
|
76
75
|
loop: z.ZodDefault<z.ZodEnum<{
|
|
77
76
|
gated: "gated";
|
|
78
77
|
"self-driven": "self-driven";
|
|
@@ -158,7 +157,6 @@ export declare const GameManifestSchema: z.ZodObject<{
|
|
|
158
157
|
styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
159
158
|
zOrder: z.ZodDefault<z.ZodNumber>;
|
|
160
159
|
pausable: z.ZodDefault<z.ZodBoolean>;
|
|
161
|
-
dev: z.ZodDefault<z.ZodBoolean>;
|
|
162
160
|
loop: z.ZodDefault<z.ZodEnum<{
|
|
163
161
|
gated: "gated";
|
|
164
162
|
"self-driven": "self-driven";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/manifest/schema.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAG,CAAU,CAAC;AAsFhD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAsJ3B,CAAC;AACJ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAM5D,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/manifest/schema.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAG,CAAU,CAAC;AAsFhD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAsJ3B,CAAC;AACJ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAM5D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsDnB,CAAC;AACZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAkB5D,eAAO,MAAM,eAAe;;;;;EAMzB,CAAC;AACJ,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,qBAAqB;;;;EAEa,CAAC;AAChD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;kBAqC7B,CAAC;AACJ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAMhE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoTyD,CAAC;AAEzF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
package/dist/manifest/schema.js
CHANGED
|
@@ -266,17 +266,6 @@ export const AdapterRootSchema = z
|
|
|
266
266
|
.boolean()
|
|
267
267
|
.default(true)
|
|
268
268
|
.describe('Whether play-mode pause/step applies to this root'),
|
|
269
|
-
dev: z
|
|
270
|
-
.boolean()
|
|
271
|
-
.default(false)
|
|
272
|
-
.describe("Marks this root as a DEV LAYER: the game's own dev GUI, not shipped game content. " +
|
|
273
|
-
'Four readers act on it. `mountManifestRoots` mounts it only when dev layers are ' +
|
|
274
|
-
'enabled (`devLayersEnabled`, runtime/dev-layers.ts), so a production build carries ' +
|
|
275
|
-
'no dev GUI; the host stacks every dev root ABOVE every non-dev root (a dev layer ' +
|
|
276
|
-
'sits topmost, and as a DOM layer it steals no input from the game while closed); ' +
|
|
277
|
-
'the play compositor EXCLUDES dev layers from a capture unless the capture asks for ' +
|
|
278
|
-
'them; and the editor mounts a dev root as edit-time CHROME rather than authorable ' +
|
|
279
|
-
'content (no hierarchy entry, no OID stamping, no JSX write-back, not selectable).'),
|
|
280
269
|
loop: z
|
|
281
270
|
.enum(['gated', 'self-driven'])
|
|
282
271
|
.default('gated')
|
|
@@ -398,17 +387,9 @@ export const GameManifestSchema = z
|
|
|
398
387
|
// root): a second root of the same medium parsed cleanly and was then
|
|
399
388
|
// silently never mounted, which is the failure mode this rejects.
|
|
400
389
|
//
|
|
401
|
-
// DEV LAYERS ARE COUNTED SEPARATELY. A `dev: true` root is not content
|
|
402
|
-
// competing for the medium — it is the game's dev GUI stacked above
|
|
403
|
-
// everything (`create-runtime.ts`'s stacking pass), and the editor
|
|
404
|
-
// mounts it as chrome, not as the one dom document. Counting it with
|
|
405
|
-
// the content roots would make the ratified shape — a game with a HUD
|
|
406
|
-
// and a dev panel, both `dom` — unrepresentable. The one-per-medium
|
|
407
|
-
// rule still applies WITHIN the dev band, for the same
|
|
408
|
-
// silently-never-mounted reason.
|
|
409
390
|
const idsByMedium = new Map();
|
|
410
391
|
for (const root of roots) {
|
|
411
|
-
const medium =
|
|
392
|
+
const medium = rootMedium(root);
|
|
412
393
|
const ids = idsByMedium.get(medium);
|
|
413
394
|
if (ids)
|
|
414
395
|
ids.push(root.id);
|
|
@@ -431,9 +412,7 @@ export const GameManifestSchema = z
|
|
|
431
412
|
.describe("The Game's explicit, non-empty adapter-root composition. There is no implicit root. " +
|
|
432
413
|
'Root ids are unique, and a project declares at most ONE world root per medium — ' +
|
|
433
414
|
'one `three`, one `dom`, one canvas-surface root (first-party canvas, canvas ingest ' +
|
|
434
|
-
'and canvas module are the same medium).
|
|
435
|
-
'band: a dev layer is chrome stacked above the game, not content competing for the ' +
|
|
436
|
-
'medium, so a game may declare a `dom` HUD and a `dom` dev layer — but not two of either.'),
|
|
415
|
+
'and canvas module are the same medium).'),
|
|
437
416
|
authoring: z
|
|
438
417
|
.object({
|
|
439
418
|
hierarchy: z
|
package/dist/pixi/authoring.d.ts
CHANGED
|
@@ -66,6 +66,36 @@ export declare class AuthoringAdapter2D {
|
|
|
66
66
|
private overlay;
|
|
67
67
|
private dirty;
|
|
68
68
|
private readonly identity;
|
|
69
|
+
/**
|
|
70
|
+
* THE ROW-NAME MEMO — what makes a hierarchy read linear instead of a
|
|
71
|
+
* reflective flood walk per node per read.
|
|
72
|
+
*
|
|
73
|
+
* {@link displayLabel} is not a field read. For anything the game did not
|
|
74
|
+
* label itself it calls `viewOwnerLabel`, which climbs eight ancestors and
|
|
75
|
+
* reflects over each one's own fields, its bags, and two levels of whatever
|
|
76
|
+
* those hold — a deliberate search for the game object that owns this
|
|
77
|
+
* `.view`. Measured 2026-08-20 on a 1822-node `@pixi/react` canvas world,
|
|
78
|
+
* with the tab VISIBLE and the world rendering, one full projection walk
|
|
79
|
+
* cost ~800ms, essentially all of it here: once a world has rendered, the
|
|
80
|
+
* ancestors' own fields include Pixi's live render-group graph, so the
|
|
81
|
+
* search walks that too and finds nothing, every time, for every node.
|
|
82
|
+
*
|
|
83
|
+
* And it was asked four times per node per derivation — the projection
|
|
84
|
+
* walk, the conformance probe and the hierarchy facet each re-ask — which
|
|
85
|
+
* is how a status snapshot reached 115,433 `toNode` calls on one tree.
|
|
86
|
+
*
|
|
87
|
+
* ## What invalidates a remembered name
|
|
88
|
+
*
|
|
89
|
+
* Every input the derivation reads OFF THE OBJECT: its authored `.label`,
|
|
90
|
+
* its class, its texture, its parent, and how many children it has. Any of
|
|
91
|
+
* those changing re-derives — so a rename, a reparent, a retexture, and a
|
|
92
|
+
* sibling added or removed are all seen. What a remembered name does NOT
|
|
93
|
+
* re-notice is a game reassigning an ANCESTOR's field to point at this view
|
|
94
|
+
* after the fact, with the tree otherwise untouched; `viewOwnerLabel` is a
|
|
95
|
+
* naming heuristic, not a verdict, and the alternative is the 800ms walk
|
|
96
|
+
* above on every read of the tree.
|
|
97
|
+
*/
|
|
98
|
+
private readonly names;
|
|
69
99
|
constructor(root: Container, opts?: {
|
|
70
100
|
overlay?: Overlay2D;
|
|
71
101
|
identity?: CanvasIdentity;
|
|
@@ -91,6 +121,9 @@ export declare class AuthoringAdapter2D {
|
|
|
91
121
|
roots(): EditorNode2D[];
|
|
92
122
|
node(id: string): EditorNode2D | null;
|
|
93
123
|
displayObject(id: string): Container | null;
|
|
124
|
+
/** This object's row name, derived once and remembered until one of the
|
|
125
|
+
* inputs it is derived from changes. See {@link names}. */
|
|
126
|
+
private nameOf;
|
|
94
127
|
private toNode;
|
|
95
128
|
getTransform(id: string): Transform2DValue | null;
|
|
96
129
|
setTransform(id: string, t: Partial<Transform2DValue>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authoring.d.ts","sourceRoot":"","sources":["../../src/pixi/authoring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;GAMG;AAEH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,GAAG,gBAAgB,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IAClE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IACzD,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,kEAAkE;AAClE,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAA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,SAAS,GAAG,IAAI;IAI3C;gEAC4D;IAC5D,OAAO,CAAC,MAAM;IA8Bd,OAAO,CAAC,MAAM;IAad,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAcjD,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI;IAe5D,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,EAAE;IAkBpC,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAYnD,OAAO,CAAC,aAAa;IAYrB;;;;;;;;OAQG;IACH,YAAY,CAAC,OAAO,EAAE,SAAS,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE;IAevE,OAAO,IAAI,OAAO;IAGlB,gBAAgB,IAAI,SAAS;IAG7B,gFAAgF;IAChF,cAAc,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI;IAKxC,wFAAwF;IACxF,SAAS,IAAI,IAAI;CAGlB"}
|
package/dist/pixi/authoring.js
CHANGED
|
@@ -22,7 +22,12 @@ function kindOf(o) {
|
|
|
22
22
|
* are not names — they used to win and hide every owner. Then the texture
|
|
23
23
|
* alias (`Sprite.from('satellite')`). Then a remaining game constructor
|
|
24
24
|
* (`TitleScreen`, `PrimaryButton`). Bare `new Container()` still reads as
|
|
25
|
-
* `container
|
|
25
|
+
* `container` — plus its child count when it has children, because ten
|
|
26
|
+
* unnamed siblings that all read `container` name nothing at all; the
|
|
27
|
+
* editor loads games that never labelled anything and the panel still has
|
|
28
|
+
* to be legible. The count is DISPLAY only (row ids keep using raw
|
|
29
|
+
* `.label`) and rides only this last fallthrough: a row that earned a real
|
|
30
|
+
* name is never decorated.
|
|
26
31
|
*/
|
|
27
32
|
function displayLabel(o) {
|
|
28
33
|
const authored = authoredLabel(o);
|
|
@@ -37,12 +42,27 @@ function displayLabel(o) {
|
|
|
37
42
|
const ctor = usefulCtorName(o);
|
|
38
43
|
if (ctor)
|
|
39
44
|
return ctor;
|
|
40
|
-
|
|
45
|
+
const kind = kindOf(o);
|
|
46
|
+
const childCount = o.children?.length ?? 0;
|
|
47
|
+
return childCount > 0 ? `${kind} (${childCount})` : kind;
|
|
41
48
|
}
|
|
42
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Pixi v8 stamps Sprite/Graphics `.label` with the class name. That is not an
|
|
51
|
+
* authored name.
|
|
52
|
+
*
|
|
53
|
+
* The minified-constructor guard is about the SAME leak: a shipped build's
|
|
54
|
+
* `_Container` becomes `e`, and that `e` is a class name wearing a label's
|
|
55
|
+
* clothes. It is only that leak when the label IS this object's own class
|
|
56
|
+
* name — `container.label = 'fx'` (or 'ui', 'hp') is a name the game
|
|
57
|
+
* actually authored, and a game gets to be terse.
|
|
58
|
+
*/
|
|
43
59
|
function authoredLabel(o) {
|
|
44
60
|
const authored = o.label?.trim();
|
|
45
|
-
if (!authored
|
|
61
|
+
if (!authored)
|
|
62
|
+
return undefined;
|
|
63
|
+
if (isMinifiedCtor(authored) && authored !== o.constructor?.name)
|
|
64
|
+
return authored;
|
|
65
|
+
if (isGenericPixiCtor(authored))
|
|
46
66
|
return undefined;
|
|
47
67
|
return authored;
|
|
48
68
|
}
|
|
@@ -237,6 +257,36 @@ export class AuthoringAdapter2D {
|
|
|
237
257
|
overlay = {};
|
|
238
258
|
dirty = false;
|
|
239
259
|
identity;
|
|
260
|
+
/**
|
|
261
|
+
* THE ROW-NAME MEMO — what makes a hierarchy read linear instead of a
|
|
262
|
+
* reflective flood walk per node per read.
|
|
263
|
+
*
|
|
264
|
+
* {@link displayLabel} is not a field read. For anything the game did not
|
|
265
|
+
* label itself it calls `viewOwnerLabel`, which climbs eight ancestors and
|
|
266
|
+
* reflects over each one's own fields, its bags, and two levels of whatever
|
|
267
|
+
* those hold — a deliberate search for the game object that owns this
|
|
268
|
+
* `.view`. Measured 2026-08-20 on a 1822-node `@pixi/react` canvas world,
|
|
269
|
+
* with the tab VISIBLE and the world rendering, one full projection walk
|
|
270
|
+
* cost ~800ms, essentially all of it here: once a world has rendered, the
|
|
271
|
+
* ancestors' own fields include Pixi's live render-group graph, so the
|
|
272
|
+
* search walks that too and finds nothing, every time, for every node.
|
|
273
|
+
*
|
|
274
|
+
* And it was asked four times per node per derivation — the projection
|
|
275
|
+
* walk, the conformance probe and the hierarchy facet each re-ask — which
|
|
276
|
+
* is how a status snapshot reached 115,433 `toNode` calls on one tree.
|
|
277
|
+
*
|
|
278
|
+
* ## What invalidates a remembered name
|
|
279
|
+
*
|
|
280
|
+
* Every input the derivation reads OFF THE OBJECT: its authored `.label`,
|
|
281
|
+
* its class, its texture, its parent, and how many children it has. Any of
|
|
282
|
+
* those changing re-derives — so a rename, a reparent, a retexture, and a
|
|
283
|
+
* sibling added or removed are all seen. What a remembered name does NOT
|
|
284
|
+
* re-notice is a game reassigning an ANCESTOR's field to point at this view
|
|
285
|
+
* after the fact, with the tree otherwise untouched; `viewOwnerLabel` is a
|
|
286
|
+
* naming heuristic, not a verdict, and the alternative is the 800ms walk
|
|
287
|
+
* above on every read of the tree.
|
|
288
|
+
*/
|
|
289
|
+
names = new WeakMap();
|
|
240
290
|
constructor(root, opts = {}) {
|
|
241
291
|
this.root = root;
|
|
242
292
|
if (opts.overlay)
|
|
@@ -291,12 +341,42 @@ export class AuthoringAdapter2D {
|
|
|
291
341
|
displayObject(id) {
|
|
292
342
|
return this.byId.get(id) ?? null;
|
|
293
343
|
}
|
|
344
|
+
/** This object's row name, derived once and remembered until one of the
|
|
345
|
+
* inputs it is derived from changes. See {@link names}. */
|
|
346
|
+
nameOf(o) {
|
|
347
|
+
const cached = this.names.get(o);
|
|
348
|
+
const parent = o.parent ?? null;
|
|
349
|
+
const type = o.constructor;
|
|
350
|
+
const own = o.label ?? null;
|
|
351
|
+
const texture = o.texture ?? null;
|
|
352
|
+
const childCount = o.children?.length ?? 0;
|
|
353
|
+
if (cached &&
|
|
354
|
+
cached.parent === parent &&
|
|
355
|
+
cached.type === type &&
|
|
356
|
+
cached.own === own &&
|
|
357
|
+
cached.texture === texture &&
|
|
358
|
+
cached.childCount === childCount) {
|
|
359
|
+
return cached;
|
|
360
|
+
}
|
|
361
|
+
const derived = {
|
|
362
|
+
label: displayLabel(o),
|
|
363
|
+
kind: kindOf(o),
|
|
364
|
+
parent,
|
|
365
|
+
type,
|
|
366
|
+
own,
|
|
367
|
+
texture,
|
|
368
|
+
childCount,
|
|
369
|
+
};
|
|
370
|
+
this.names.set(o, derived);
|
|
371
|
+
return derived;
|
|
372
|
+
}
|
|
294
373
|
toNode(o) {
|
|
295
374
|
const self = o;
|
|
375
|
+
const { label, kind } = this.nameOf(o);
|
|
296
376
|
return {
|
|
297
377
|
id: self.__authId ?? '',
|
|
298
|
-
label
|
|
299
|
-
kind
|
|
378
|
+
label,
|
|
379
|
+
kind,
|
|
300
380
|
parentId: o.parent?.__authId ?? null,
|
|
301
381
|
childIds: o.children.map((c) => c.__authId ?? ''),
|
|
302
382
|
};
|
|
@@ -46,6 +46,18 @@ export declare function WorldProvider({ game, children }: PropsWithChildren<{
|
|
|
46
46
|
* descriptively when called outside one — matching the repo's loud-failure
|
|
47
47
|
* habit rather than silently returning `null`. */
|
|
48
48
|
export declare function useGame(): Game;
|
|
49
|
+
/**
|
|
50
|
+
* {@link useGame}'s non-throwing sibling: the `Game` when one hosts this tree,
|
|
51
|
+
* `null` otherwise.
|
|
52
|
+
*
|
|
53
|
+
* For components that legitimately mount BOTH under a running game and under a
|
|
54
|
+
* host that has none — the editor design-mounts a world to author it, and a
|
|
55
|
+
* story renders a component with no game at all. Those components must degrade
|
|
56
|
+
* (a dev/QA surface that simply has nothing to drive) rather than throw during
|
|
57
|
+
* render, which would take the whole world down with it. Everything else uses
|
|
58
|
+
* `useGame`, whose throw is the honest report of a wiring bug.
|
|
59
|
+
*/
|
|
60
|
+
export declare function useOptionalGame(): Game | null;
|
|
49
61
|
/**
|
|
50
62
|
* Subscribe to a selected slice of game state. Re-renders only when the
|
|
51
63
|
* selected value changes: the selector re-runs at most once per completed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world-state.d.ts","sourceRoot":"","sources":["../../src/react/world-state.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAEL,KAAK,iBAAiB,EAMvB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,EAA4B,KAAK,MAAM,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AACjG,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD;6EAC6E;AAC7E,OAAO,EAAE,OAAO,EAAE,CAAC;AAInB;;;;;;;;;;;;;;oFAcoF;AACpF,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,iBAAiB,CAAC;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC,+BAElF;AAED;;mDAEmD;AACnD,wBAAgB,OAAO,IAAI,IAAI,CAQ9B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,CAAC,EAAE,MAAM,GAAE,MAAM,CAAC,CAAC,CAAa,GAAG,CAAC,CAW9F;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAiBlF;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,OA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AQ,GAAG,SAAS,GAAG,SAAS,EAC1E,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;CAAE,EACrE,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAC/D,IAAI,CAeN;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CASxE"}
|
|
@@ -51,6 +51,20 @@ export function useGame() {
|
|
|
51
51
|
}
|
|
52
52
|
return game;
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* {@link useGame}'s non-throwing sibling: the `Game` when one hosts this tree,
|
|
56
|
+
* `null` otherwise.
|
|
57
|
+
*
|
|
58
|
+
* For components that legitimately mount BOTH under a running game and under a
|
|
59
|
+
* host that has none — the editor design-mounts a world to author it, and a
|
|
60
|
+
* story renders a component with no game at all. Those components must degrade
|
|
61
|
+
* (a dev/QA surface that simply has nothing to drive) rather than throw during
|
|
62
|
+
* render, which would take the whole world down with it. Everything else uses
|
|
63
|
+
* `useGame`, whose throw is the honest report of a wiring bug.
|
|
64
|
+
*/
|
|
65
|
+
export function useOptionalGame() {
|
|
66
|
+
return useContext(GameContext);
|
|
67
|
+
}
|
|
54
68
|
/**
|
|
55
69
|
* Subscribe to a selected slice of game state. Re-renders only when the
|
|
56
70
|
* selected value changes: the selector re-runs at most once per completed
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
* callers are `registerParticleSystem` / `unregisterParticleSystem`.
|
|
92
92
|
* - The render target and override material belong to the
|
|
93
93
|
* {@link SoftParticleDepthPass} instance and die with its `dispose()`. The
|
|
94
|
-
* pass
|
|
95
|
-
*
|
|
96
|
-
* allowed to end it.
|
|
94
|
+
* pass is owned by the renderer loop that calls it: an adapter mount for a
|
|
95
|
+
* runtime renderer, or the editor Scene viewport for its renderer. That
|
|
96
|
+
* owner's teardown is the one path allowed to end it.
|
|
97
97
|
*/
|
|
98
98
|
import * as THREE from 'three';
|
|
99
99
|
import type { BatchedRenderer } from 'three.quarks';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"soft-particle-depth.d.ts","sourceRoot":"","sources":["../../src/render/soft-particle-depth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAepD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,IAAI,KAAK,CAAC,WAAW,CAOnD;AAED,8FAA8F;AAC9F,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAQvE;AAED,uFAAuF;AACvF,wBAAgB,8BAA8B,IAAI,MAAM,CAEvD;AAED,0FAA0F;AAC1F,MAAM,WAAW,yBAAyB;IACxC,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC3D,eAAe,IAAI,KAAK,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAClD,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAAC;IAC9D,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CA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AAC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;IAC1D,kGAAkG;IAClG,QAAQ,CAAC,SAAS,CAAC,EAAE;QAAE,UAAU,EAAE,OAAO,CAAC;QAAC,WAAW,EAAE,OAAO,CAAA;KAAE,CAAC;CACpE;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,EAAE,yBAAyB,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;IAC5F,OAAO,IAAI,IAAI,CAAC;CACjB;AA0CD,wBAAgB,2BAA2B,IAAI,qBAAqB,CA0GnE"}
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
* callers are `registerParticleSystem` / `unregisterParticleSystem`.
|
|
92
92
|
* - The render target and override material belong to the
|
|
93
93
|
* {@link SoftParticleDepthPass} instance and die with its `dispose()`. The
|
|
94
|
-
* pass
|
|
95
|
-
*
|
|
96
|
-
* allowed to end it.
|
|
94
|
+
* pass is owned by the renderer loop that calls it: an adapter mount for a
|
|
95
|
+
* runtime renderer, or the editor Scene viewport for its renderer. That
|
|
96
|
+
* owner's teardown is the one path allowed to end it.
|
|
97
97
|
*/
|
|
98
98
|
import * as THREE from 'three';
|
|
99
99
|
/**
|
|
@@ -173,16 +173,11 @@ function drawsIntoDepth(object) {
|
|
|
173
173
|
* The three renderer members this prepass CANNOT do without — the render-target
|
|
174
174
|
* swap it draws through, and the buffer size it sizes that target from.
|
|
175
175
|
*
|
|
176
|
-
* A real `WebGLRenderer` has all of them. A
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
* not be settled at all. A prepass is an EFFECT: with no renderer to run it on,
|
|
182
|
-
* the right answer is the inert far-depth default every batch is already bound
|
|
183
|
-
* to (see {@link farDepthTexture}), which is pixel-identical to a batch that
|
|
184
|
-
* never asked for soft particles. So this degrades, loudly and once, instead of
|
|
185
|
-
* taking the frame down with it.
|
|
176
|
+
* A real `WebGLRenderer` has all of them. A design-time stand-in that only has
|
|
177
|
+
* to answer `render` may mount a world so another host can read it, but cannot
|
|
178
|
+
* run this effect. The editor does not pass that stand-in here: its real
|
|
179
|
+
* viewport renderer owns its own pass. Other incomplete hosts still degrade
|
|
180
|
+
* loudly and once instead of taking the frame down.
|
|
186
181
|
*/
|
|
187
182
|
const REQUIRED_RENDERER_MEMBERS = [
|
|
188
183
|
'getDrawingBufferSize',
|
|
@@ -56,22 +56,6 @@ export interface RootMountSpecBase {
|
|
|
56
56
|
readonly zOrder?: number | undefined;
|
|
57
57
|
/** Whether play-mode pause/step applies to this world (D10). Defaults to `true`. */
|
|
58
58
|
readonly pausable?: boolean | undefined;
|
|
59
|
-
/**
|
|
60
|
-
* `vgai.project.json`'s `dev: true` — this root is a DEV LAYER (the game's
|
|
61
|
-
* own dev GUI), not shipped game content. Two things happen here: the
|
|
62
|
-
* surface is stacked ABOVE every non-dev root (a dev layer sits topmost),
|
|
63
|
-
* and it is marked `data-vgai-dev-layer="true"` so the play compositor can
|
|
64
|
-
* leave it out of a capture (`composite-screenshot.ts`). Whether a dev root
|
|
65
|
-
* reaches this function at all is the CALLER's gate —
|
|
66
|
-
* `mountManifestRoots` asks `devLayersEnabled()` before building the spec.
|
|
67
|
-
*
|
|
68
|
-
* It steals no input from the game while closed for a reason that predates
|
|
69
|
-
* this flag and needs no new mechanism: a dev layer is a `dom` root, DOM
|
|
70
|
-
* layers are `pointer-events:none` (see `mountOneReactRoot`) with the
|
|
71
|
-
* mounted tree opting individual elements back in, and the input router
|
|
72
|
-
* never sees DOM roots at all.
|
|
73
|
-
*/
|
|
74
|
-
readonly dev?: boolean | undefined;
|
|
75
59
|
/**
|
|
76
60
|
* Optional claim predicate for the delegating input router (D5 §2a), over
|
|
77
61
|
* a point RELATIVE TO THE CONTAINER. Absent means: this world claims only
|
|
@@ -227,6 +211,8 @@ export interface RootsRuntimeConfig {
|
|
|
227
211
|
*/
|
|
228
212
|
export interface GameSession {
|
|
229
213
|
stop(): void;
|
|
214
|
+
/** Resolves after every root has finished the cleanup initiated by stop(). */
|
|
215
|
+
readonly stopComplete: Promise<void>;
|
|
230
216
|
pause(): void;
|
|
231
217
|
resume(): void;
|
|
232
218
|
step(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-runtime.d.ts","sourceRoot":"","sources":["../../src/runtime/create-runtime.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAqB,cAAc,EAAoB,MAAM,yBAAyB,CAAC;AACnG,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAEhB,gBAAgB,EAChB,WAAW,EACZ,MAAM,yBAAyB,CAAC;AAOjC,OAAO,EAGL,KAAK,IAAI,EACT,KAAK,YAAY,EAEjB,KAAK,YAAY,EAClB,MAAM,QAAQ,CAAC;AAGhB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA0B/C;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,gBAAgB,EACzB,IAAI,CAAC,EAAE;IAAE,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,GACjE,YAAY,CAYd;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,WAAW,CAAC,QAAQ,CAAC,EAC9B,OAAO,EAAE,eAAe,EACxB,IAAI,CAAC,EAAE;IAAE,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,GACjE,YAAY,CAYd;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB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