@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
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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,CAAC,YAAY,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAC7E,SAAS,CAAC;IACd;;;4EAGwE;IACxE,QAAQ,CAAC,MAAM,EACX;QACE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC5C,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC3C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC1C,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC3C,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC5C,GACD,SAAS,CAAC;IACd;;;mDAG+C;IAC/C,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,CAAC;CAC3C;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
|
}
|
|
@@ -5,20 +5,20 @@ import { z } from 'zod';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const GAME_MANIFEST_VERSION: 2;
|
|
7
7
|
export declare const RootAdapterSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<readonly [z.ZodEnum<{
|
|
8
|
-
canvas: "canvas";
|
|
9
8
|
three: "three";
|
|
9
|
+
canvas: "canvas";
|
|
10
10
|
dom: "dom";
|
|
11
11
|
}>, z.ZodObject<{
|
|
12
12
|
module: z.ZodString;
|
|
13
13
|
surface: z.ZodEnum<{
|
|
14
|
-
canvas: "canvas";
|
|
15
14
|
three: "three";
|
|
15
|
+
canvas: "canvas";
|
|
16
16
|
dom: "dom";
|
|
17
17
|
}>;
|
|
18
18
|
}, z.core.$strict>, z.ZodObject<{
|
|
19
19
|
surface: z.ZodEnum<{
|
|
20
|
-
canvas: "canvas";
|
|
21
20
|
three: "three";
|
|
21
|
+
canvas: "canvas";
|
|
22
22
|
dom: "dom";
|
|
23
23
|
}>;
|
|
24
24
|
ingest: z.ZodObject<{
|
|
@@ -39,20 +39,20 @@ export declare const AdapterRootSchema: z.ZodObject<{
|
|
|
39
39
|
id: z.ZodString;
|
|
40
40
|
description: z.ZodOptional<z.ZodString>;
|
|
41
41
|
adapter: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<readonly [z.ZodEnum<{
|
|
42
|
-
canvas: "canvas";
|
|
43
42
|
three: "three";
|
|
43
|
+
canvas: "canvas";
|
|
44
44
|
dom: "dom";
|
|
45
45
|
}>, z.ZodObject<{
|
|
46
46
|
module: z.ZodString;
|
|
47
47
|
surface: z.ZodEnum<{
|
|
48
|
-
canvas: "canvas";
|
|
49
48
|
three: "three";
|
|
49
|
+
canvas: "canvas";
|
|
50
50
|
dom: "dom";
|
|
51
51
|
}>;
|
|
52
52
|
}, z.core.$strict>, z.ZodObject<{
|
|
53
53
|
surface: z.ZodEnum<{
|
|
54
|
-
canvas: "canvas";
|
|
55
54
|
three: "three";
|
|
55
|
+
canvas: "canvas";
|
|
56
56
|
dom: "dom";
|
|
57
57
|
}>;
|
|
58
58
|
ingest: z.ZodObject<{
|
|
@@ -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";
|
|
@@ -125,20 +124,20 @@ export declare const GameManifestSchema: z.ZodObject<{
|
|
|
125
124
|
id: z.ZodString;
|
|
126
125
|
description: z.ZodOptional<z.ZodString>;
|
|
127
126
|
adapter: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<readonly [z.ZodEnum<{
|
|
128
|
-
canvas: "canvas";
|
|
129
127
|
three: "three";
|
|
128
|
+
canvas: "canvas";
|
|
130
129
|
dom: "dom";
|
|
131
130
|
}>, z.ZodObject<{
|
|
132
131
|
module: z.ZodString;
|
|
133
132
|
surface: z.ZodEnum<{
|
|
134
|
-
canvas: "canvas";
|
|
135
133
|
three: "three";
|
|
134
|
+
canvas: "canvas";
|
|
136
135
|
dom: "dom";
|
|
137
136
|
}>;
|
|
138
137
|
}, z.core.$strict>, z.ZodObject<{
|
|
139
138
|
surface: z.ZodEnum<{
|
|
140
|
-
canvas: "canvas";
|
|
141
139
|
three: "three";
|
|
140
|
+
canvas: "canvas";
|
|
142
141
|
dom: "dom";
|
|
143
142
|
}>;
|
|
144
143
|
ingest: z.ZodObject<{
|
|
@@ -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,KA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Y,EAAE;IAIvB,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;IAKrC,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,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
|
@@ -2,12 +2,251 @@ function kindOf(o) {
|
|
|
2
2
|
const ctor = o.constructor?.name?.toLowerCase() ?? 'container';
|
|
3
3
|
if (ctor.includes('animatedsprite'))
|
|
4
4
|
return 'animatedsprite';
|
|
5
|
+
if (ctor.includes('nineslice'))
|
|
6
|
+
return 'nineslicesprite';
|
|
7
|
+
if (ctor.includes('tiling'))
|
|
8
|
+
return 'tilingsprite';
|
|
5
9
|
if (ctor.includes('sprite'))
|
|
6
10
|
return 'sprite';
|
|
7
11
|
if (ctor.includes('text'))
|
|
8
12
|
return 'text';
|
|
13
|
+
if (ctor.includes('graphics'))
|
|
14
|
+
return 'graphics';
|
|
9
15
|
return 'container';
|
|
10
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Hierarchy row text — the Pixi sibling of three's `object.name || object.type`.
|
|
19
|
+
*
|
|
20
|
+
* Authored `.label` first. Then a GAME name: a field, a bag key, or a class
|
|
21
|
+
* that owns this `.view`. Stock Pixi types (`Sprite`, `Graphics`, `_Container`)
|
|
22
|
+
* are not names — they used to win and hide every owner. Then the texture
|
|
23
|
+
* alias (`Sprite.from('satellite')`). Then a remaining game constructor
|
|
24
|
+
* (`TitleScreen`, `PrimaryButton`). Bare `new Container()` still reads as
|
|
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.
|
|
31
|
+
*/
|
|
32
|
+
function displayLabel(o) {
|
|
33
|
+
const authored = authoredLabel(o);
|
|
34
|
+
if (authored)
|
|
35
|
+
return authored;
|
|
36
|
+
const owner = viewOwnerLabel(o);
|
|
37
|
+
if (owner)
|
|
38
|
+
return owner;
|
|
39
|
+
const asset = textureLabel(o);
|
|
40
|
+
if (asset)
|
|
41
|
+
return asset;
|
|
42
|
+
const ctor = usefulCtorName(o);
|
|
43
|
+
if (ctor)
|
|
44
|
+
return ctor;
|
|
45
|
+
const kind = kindOf(o);
|
|
46
|
+
const childCount = o.children?.length ?? 0;
|
|
47
|
+
return childCount > 0 ? `${kind} (${childCount})` : kind;
|
|
48
|
+
}
|
|
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
|
+
*/
|
|
59
|
+
function authoredLabel(o) {
|
|
60
|
+
const authored = o.label?.trim();
|
|
61
|
+
if (!authored)
|
|
62
|
+
return undefined;
|
|
63
|
+
if (isMinifiedCtor(authored) && authored !== o.constructor?.name)
|
|
64
|
+
return authored;
|
|
65
|
+
if (isGenericPixiCtor(authored))
|
|
66
|
+
return undefined;
|
|
67
|
+
return authored;
|
|
68
|
+
}
|
|
69
|
+
function isMinifiedCtor(name) {
|
|
70
|
+
return name.length <= 2 && name === name.toLowerCase();
|
|
71
|
+
}
|
|
72
|
+
/** Pixi's own display types. The shipped build prefixes them `_`. */
|
|
73
|
+
const STOCK_PIXI_CTOR = new Set([
|
|
74
|
+
'container',
|
|
75
|
+
'displayobject',
|
|
76
|
+
'sprite',
|
|
77
|
+
'animatedsprite',
|
|
78
|
+
'nineslicesprite',
|
|
79
|
+
'tilingsprite',
|
|
80
|
+
'text',
|
|
81
|
+
'bitmaptext',
|
|
82
|
+
'htmltext',
|
|
83
|
+
'graphics',
|
|
84
|
+
'mesh',
|
|
85
|
+
]);
|
|
86
|
+
function isGenericPixiCtor(name) {
|
|
87
|
+
if (isMinifiedCtor(name) || name === 'Object' || name === 'Function')
|
|
88
|
+
return true;
|
|
89
|
+
return STOCK_PIXI_CTOR.has(name.replace(/^_+/, '').toLowerCase());
|
|
90
|
+
}
|
|
91
|
+
function textureLabel(object) {
|
|
92
|
+
const texture = object.texture;
|
|
93
|
+
const raw = texture?.label?.trim();
|
|
94
|
+
if (!raw || /^(_?texture)?(empty|white)$/i.test(raw))
|
|
95
|
+
return undefined;
|
|
96
|
+
const leaf = raw.split('/').pop() ?? raw;
|
|
97
|
+
return leaf.replace(/\.[a-z0-9]+$/i, '') || undefined;
|
|
98
|
+
}
|
|
99
|
+
function usefulCtorName(value) {
|
|
100
|
+
const name = value.constructor?.name;
|
|
101
|
+
if (!name || isGenericPixiCtor(name))
|
|
102
|
+
return undefined;
|
|
103
|
+
return name.replace(/^_+/, '') || undefined;
|
|
104
|
+
}
|
|
105
|
+
function fieldLabel(key) {
|
|
106
|
+
const trimmed = key.replace(/^_+/, '');
|
|
107
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
108
|
+
}
|
|
109
|
+
function isPixiDisplay(value) {
|
|
110
|
+
return ('addChild' in value &&
|
|
111
|
+
typeof value.addChild === 'function' &&
|
|
112
|
+
'children' in value);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Bubbo-style owner, identity only. TitleScreen keeps `this._cannon` and
|
|
116
|
+
* parents `this._cannon.view`. A grouping node is the field itself
|
|
117
|
+
* (`this._bottomAnimContainer`). A pool or atlas lives in a bag — Array,
|
|
118
|
+
* Map, Set, or an object literal (`_decor[]`, `allSystems`, `_parts[id]`).
|
|
119
|
+
* Scan each ancestor's own fields first — a flood walk of Pixi internals
|
|
120
|
+
* never reached `_cannon` inside the budget.
|
|
121
|
+
*/
|
|
122
|
+
function viewOwnerLabel(view) {
|
|
123
|
+
const seen = new WeakSet();
|
|
124
|
+
let host = view.parent;
|
|
125
|
+
for (let hops = 0; hops < 8 && host && typeof host === 'object'; hops++) {
|
|
126
|
+
const found = labelFromHolder(host, view, seen) ?? findHeldOwner(host, view, 2, seen);
|
|
127
|
+
if (found)
|
|
128
|
+
return found;
|
|
129
|
+
host = host.parent;
|
|
130
|
+
}
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
function isGameFieldKey(key) {
|
|
134
|
+
// Skip display-list indices (`0`, `1`) and Pixi internals (`children`).
|
|
135
|
+
return /^_?[A-Za-z][A-Za-zA-Z0-9]*$/.test(key) && !PIXI_INTERNAL_KEY.has(key);
|
|
136
|
+
}
|
|
137
|
+
const PIXI_INTERNAL_KEY = new Set([
|
|
138
|
+
'parent',
|
|
139
|
+
'children',
|
|
140
|
+
'transform',
|
|
141
|
+
'position',
|
|
142
|
+
'scale',
|
|
143
|
+
'pivot',
|
|
144
|
+
'skew',
|
|
145
|
+
'worldTransform',
|
|
146
|
+
'localTransform',
|
|
147
|
+
]);
|
|
148
|
+
function labelFromHolder(host, view, seen) {
|
|
149
|
+
if (seen.has(host))
|
|
150
|
+
return undefined;
|
|
151
|
+
seen.add(host);
|
|
152
|
+
const asBag = nameInBag(host, view, undefined, seen);
|
|
153
|
+
if (asBag)
|
|
154
|
+
return asBag;
|
|
155
|
+
for (const [key, value] of Object.entries(host)) {
|
|
156
|
+
if (!isGameFieldKey(key))
|
|
157
|
+
continue;
|
|
158
|
+
const named = nameIfHoldsView(host, key, value, view);
|
|
159
|
+
if (named)
|
|
160
|
+
return named;
|
|
161
|
+
const nested = nameInBag(value, view, key, seen);
|
|
162
|
+
if (nested)
|
|
163
|
+
return nested;
|
|
164
|
+
}
|
|
165
|
+
return undefined;
|
|
166
|
+
}
|
|
167
|
+
function nameInBag(value, view, fieldKey, seen) {
|
|
168
|
+
const entries = bagEntries(value);
|
|
169
|
+
if (!entries)
|
|
170
|
+
return undefined;
|
|
171
|
+
for (const [itemKey, item] of entries) {
|
|
172
|
+
const named = nameBagItem(value, item, usableBagKey(itemKey) ?? fieldKey, view, seen);
|
|
173
|
+
if (named)
|
|
174
|
+
return named;
|
|
175
|
+
}
|
|
176
|
+
return undefined;
|
|
177
|
+
}
|
|
178
|
+
function nameBagItem(bag, item, key, view, seen) {
|
|
179
|
+
if (key) {
|
|
180
|
+
const named = nameIfHoldsView(item && typeof item === 'object' ? item : bag, key, item, view);
|
|
181
|
+
if (named)
|
|
182
|
+
return named;
|
|
183
|
+
}
|
|
184
|
+
else if (item && typeof item === 'object' && item.view === view) {
|
|
185
|
+
const named = usefulCtorName(item);
|
|
186
|
+
if (named)
|
|
187
|
+
return named;
|
|
188
|
+
}
|
|
189
|
+
if (item && typeof item === 'object' && !isPixiDisplay(item)) {
|
|
190
|
+
return labelFromHolder(item, view, seen);
|
|
191
|
+
}
|
|
192
|
+
return undefined;
|
|
193
|
+
}
|
|
194
|
+
function usableBagKey(key) {
|
|
195
|
+
if (!key || /^\d+$/.test(key))
|
|
196
|
+
return undefined;
|
|
197
|
+
return isGameFieldKey(key) || key.includes('-') ? (fieldLabel(key) ?? key) : undefined;
|
|
198
|
+
}
|
|
199
|
+
function bagEntries(value) {
|
|
200
|
+
if (!value || typeof value !== 'object')
|
|
201
|
+
return undefined;
|
|
202
|
+
// Game arrays are allowed to be exotic subclasses. Do not dispatch through
|
|
203
|
+
// their overridable `map`: one shipped Pixi game returns its elements rather
|
|
204
|
+
// than `[key, value]` pairs there, which made hierarchy labeling throw while
|
|
205
|
+
// destructuring the result. The authoring seam treats game objects as
|
|
206
|
+
// untrusted observations, so normalize with indexed reads into our own array.
|
|
207
|
+
if (Array.isArray(value)) {
|
|
208
|
+
const entries = [];
|
|
209
|
+
for (let index = 0; index < value.length; index++) {
|
|
210
|
+
entries.push([String(index), value[index]]);
|
|
211
|
+
}
|
|
212
|
+
return entries;
|
|
213
|
+
}
|
|
214
|
+
if (value instanceof Map)
|
|
215
|
+
return [...value.entries()].map(([key, item]) => [String(key), item]);
|
|
216
|
+
if (value instanceof Set)
|
|
217
|
+
return [...value].map((item, index) => [String(index), item]);
|
|
218
|
+
if (Object.getPrototypeOf(value) !== Object.prototype)
|
|
219
|
+
return undefined;
|
|
220
|
+
return Object.entries(value);
|
|
221
|
+
}
|
|
222
|
+
function nameIfHoldsView(host, key, value, view) {
|
|
223
|
+
if (value === view) {
|
|
224
|
+
const field = fieldLabel(key);
|
|
225
|
+
if (field && field.toLowerCase() !== 'view') {
|
|
226
|
+
return usefulCtorName(value) ?? field;
|
|
227
|
+
}
|
|
228
|
+
return usefulCtorName(value) ?? usefulCtorName(host) ?? field;
|
|
229
|
+
}
|
|
230
|
+
if (value && typeof value === 'object' && value.view === view) {
|
|
231
|
+
return usefulCtorName(value) ?? fieldLabel(key);
|
|
232
|
+
}
|
|
233
|
+
return undefined;
|
|
234
|
+
}
|
|
235
|
+
function findHeldOwner(held, view, depth, seen) {
|
|
236
|
+
const direct = labelFromHolder(held, view, seen);
|
|
237
|
+
if (direct)
|
|
238
|
+
return direct;
|
|
239
|
+
if (depth <= 0)
|
|
240
|
+
return undefined;
|
|
241
|
+
for (const value of Object.values(held)) {
|
|
242
|
+
if (!value || typeof value !== 'object' || isPixiDisplay(value))
|
|
243
|
+
continue;
|
|
244
|
+
const found = findHeldOwner(value, view, depth - 1, seen);
|
|
245
|
+
if (found)
|
|
246
|
+
return found;
|
|
247
|
+
}
|
|
248
|
+
return undefined;
|
|
249
|
+
}
|
|
11
250
|
/** Deterministic structural-path ids: `w2d:<path>:<kind>:<label>`. */
|
|
12
251
|
export const STRUCTURAL_CANVAS_IDENTITY = {
|
|
13
252
|
idFor: (object, path) => `w2d:${path.join('/')}:${kindOf(object)}:${object.label ?? ''}`,
|
|
@@ -18,6 +257,36 @@ export class AuthoringAdapter2D {
|
|
|
18
257
|
overlay = {};
|
|
19
258
|
dirty = false;
|
|
20
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();
|
|
21
290
|
constructor(root, opts = {}) {
|
|
22
291
|
this.root = root;
|
|
23
292
|
if (opts.overlay)
|
|
@@ -72,12 +341,42 @@ export class AuthoringAdapter2D {
|
|
|
72
341
|
displayObject(id) {
|
|
73
342
|
return this.byId.get(id) ?? null;
|
|
74
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
|
+
}
|
|
75
373
|
toNode(o) {
|
|
76
374
|
const self = o;
|
|
375
|
+
const { label, kind } = this.nameOf(o);
|
|
77
376
|
return {
|
|
78
377
|
id: self.__authId ?? '',
|
|
79
|
-
label
|
|
80
|
-
kind
|
|
378
|
+
label,
|
|
379
|
+
kind,
|
|
81
380
|
parentId: o.parent?.__authId ?? null,
|
|
82
381
|
childIds: o.children.map((c) => c.__authId ?? ''),
|
|
83
382
|
};
|
package/dist/pixi/ingest.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VisibleCaptureWindow } from '../adapter/ingest/visible-capture-window';
|
|
2
|
-
import { type SceneCapture2DHandle } from './scene-capture';
|
|
2
|
+
import { type CapturedRuntime2D, type SceneCapture2DHandle } from './scene-capture';
|
|
3
3
|
/** A registered unmodified PixiJS game (the Pixi analog of `IngestGame`). */
|
|
4
4
|
export interface IngestGame2D {
|
|
5
5
|
id: string;
|
|
@@ -33,5 +33,6 @@ export interface IngestMount2D {
|
|
|
33
33
|
export declare function mountIngestGame2D(pixiNamespace: unknown, game: IngestGame2D, opts?: {
|
|
34
34
|
captureTimeoutMs?: number;
|
|
35
35
|
onWait?: (wait: VisibleCaptureWindow | null) => void;
|
|
36
|
+
acceptCapture?: (runtime: CapturedRuntime2D) => boolean;
|
|
36
37
|
}): Promise<IngestMount2D>;
|
|
37
38
|
//# sourceMappingURL=ingest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingest.d.ts","sourceRoot":"","sources":["../../src/pixi/ingest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,
|
|
1
|
+
{"version":3,"file":"ingest.d.ts","sourceRoot":"","sources":["../../src/pixi/ingest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAC;AAEzB,6EAA6E;AAC7E,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,2EAA2E;IAC3E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,yCAAyC;IACzC,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,iBAAiB,CACrC,aAAa,EAAE,OAAO,EACtB,IAAI,EAAE,YAAY,EAClB,IAAI,GAAE;IACJ,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI,KAAK,IAAI,CAAC;IACrD,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC;CACpD,GACL,OAAO,CAAC,aAAa,CAAC,CA6BxB"}
|
package/dist/pixi/ingest.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { installSceneCapture2D } from './scene-capture';
|
|
1
|
+
import { installSceneCapture2D, } from './scene-capture';
|
|
2
2
|
/**
|
|
3
3
|
* Mount an UNMODIFIED PixiJS game via the shared-instance capture path — the 2D
|
|
4
4
|
* analog of `mountIngestGame`. Installs the render trap on the host's pixi
|
|
@@ -13,7 +13,9 @@ import { installSceneCapture2D } from './scene-capture';
|
|
|
13
13
|
* visible frame — the tab is hidden" over a canvas ingest too.
|
|
14
14
|
*/
|
|
15
15
|
export async function mountIngestGame2D(pixiNamespace, game, opts = {}) {
|
|
16
|
-
const capture = installSceneCapture2D(pixiNamespace
|
|
16
|
+
const capture = installSceneCapture2D(pixiNamespace, {
|
|
17
|
+
...(opts.acceptCapture ? { accept: opts.acceptCapture } : {}),
|
|
18
|
+
});
|
|
17
19
|
try {
|
|
18
20
|
await game.load();
|
|
19
21
|
}
|
|
@@ -65,10 +65,18 @@ export interface SceneCapture2DHandle {
|
|
|
65
65
|
setPaused(paused: boolean): void;
|
|
66
66
|
uninstall(): void;
|
|
67
67
|
}
|
|
68
|
+
export interface SceneCapture2DOptions {
|
|
69
|
+
/**
|
|
70
|
+
* Select the runtime owned by this mount when other Pixi Applications share
|
|
71
|
+
* the page (for example editor prefab previews). Rejected draws still count,
|
|
72
|
+
* but cannot satisfy {@link SceneCapture2DHandle.waitForCapture}.
|
|
73
|
+
*/
|
|
74
|
+
accept?: ((runtime: CapturedRuntime2D) => boolean) | undefined;
|
|
75
|
+
}
|
|
68
76
|
/**
|
|
69
77
|
* Install the render trap on `pixiNamespace.Application.prototype.render`. Pass the
|
|
70
78
|
* host's `pixi.js` namespace so a shared-instance game is trapped. Install once per
|
|
71
79
|
* ingest session; `uninstall()` on teardown.
|
|
72
80
|
*/
|
|
73
|
-
export declare function installSceneCapture2D(pixiNamespace: unknown): SceneCapture2DHandle;
|
|
81
|
+
export declare function installSceneCapture2D(pixiNamespace: unknown, options?: SceneCapture2DOptions): SceneCapture2DHandle;
|
|
74
82
|
//# sourceMappingURL=scene-capture.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scene-capture.d.ts","sourceRoot":"","sources":["../../src/pixi/scene-capture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAG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