@vgai/engine 0.5.16 → 0.5.18
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/renderer-config.d.ts +83 -0
- package/dist/adapter/renderer-config.d.ts.map +1 -0
- package/dist/adapter/renderer-config.js +121 -0
- package/dist/adapter/root-adapter.d.ts +6 -2
- 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 +3 -24
- 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 +2 -21
- 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 +2 -2
- package/dist/world3d-react/index.d.ts.map +1 -1
- package/dist/world3d-react/index.js +2 -2
- package/dist/world3d-react/r3f-adapter.d.ts +2 -2
- package/dist/world3d-react/r3f-adapter.d.ts.map +1 -1
- package/dist/world3d-react/r3f-adapter.js +90 -15
- 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/renderer-config.d.ts +7 -69
- package/dist/world3d-react/renderer-config.d.ts.map +1 -1
- package/dist/world3d-react/renderer-config.js +7 -108
- 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 +2 -7
- package/src/adapter/adapter-module.ts +1 -25
- package/src/adapter/finders/scenes-from-entrypoint-selection.ts +3 -8
- package/src/adapter/renderer-config.ts +178 -0
- package/src/adapter/root-adapter.ts +6 -2
- 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 +3 -26
- 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 +2 -33
- package/src/world3d-react/engine-bridge.ts +28 -3
- package/src/world3d-react/index.ts +5 -5
- package/src/world3d-react/r3f-adapter.tsx +89 -20
- package/src/world3d-react/r3f-root-factory.tsx +12 -2
- package/src/world3d-react/rapier-physics-bridge.tsx +4 -4
- package/src/world3d-react/renderer-config.ts +7 -164
- 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
|
@@ -119,17 +119,32 @@ export function createPixiReactAdapter(options) {
|
|
|
119
119
|
useEffect(resolveEffectsReady, []);
|
|
120
120
|
return null;
|
|
121
121
|
}
|
|
122
|
-
const game = runtime?.ctx.game;
|
|
123
122
|
// The React seam every dom root already has — `useWorldState`,
|
|
124
123
|
// `useDebugProvider`/`useDebugCommand`/`useDebugEmit`
|
|
125
124
|
// (`../react/world-state`) — works identically inside a canvas root
|
|
126
125
|
// because a canvas root IS React. `host.game` is genuinely absent in
|
|
127
126
|
// bare/foreign hosts, so the provider is conditional and those hooks
|
|
128
127
|
// stay the inert no-ops they already document themselves to be.
|
|
128
|
+
//
|
|
129
|
+
// READ FROM `host.game`, NEVER FROM `runtime` — the same rule, and the
|
|
130
|
+
// same reasoning, as the three lane's (`../world3d-react/r3f-adapter.tsx`,
|
|
131
|
+
// beside its own `const game = host.game`). The two providers answer
|
|
132
|
+
// different questions: `EngineBridge` rides `bridge` (the vgai runtime
|
|
133
|
+
// CONTEXT, which must not enter an ecosystem-native tree), `WorldProvider`
|
|
134
|
+
// rides the Game handle the host already holds. Keyed off `runtime`, a
|
|
135
|
+
// world mounted with `engineRuntime: false` gets no `WorldProvider` at
|
|
136
|
+
// all and every `useDebugProvider` in it no-ops IN SILENCE — no error, and
|
|
137
|
+
// `vgai eval 'await game.providers()'` lists only the built-ins. That is
|
|
138
|
+
// exactly what happened on the three lane. It has never fired here only
|
|
139
|
+
// because `pixi-react-root-factory.tsx` still leaves the runtime on;
|
|
140
|
+
// that flag is the tracked component-root migration's to flip, and this
|
|
141
|
+
// seam must not be waiting for it.
|
|
142
|
+
const game = host.game;
|
|
129
143
|
const world = createElement(Fragment, null, content, createElement(Lifecycle));
|
|
144
|
+
const provided = game ? createElement(WorldProvider, { game }, world) : world;
|
|
130
145
|
const element = bridge
|
|
131
|
-
? createElement(EngineBridge.Provider, { value: bridge },
|
|
132
|
-
:
|
|
146
|
+
? createElement(EngineBridge.Provider, { value: bridge }, provided)
|
|
147
|
+
: provided;
|
|
133
148
|
const root = createRoot(canvas);
|
|
134
149
|
// The host owns size, dpr, transparency and capture cost; the loop
|
|
135
150
|
// contract owns `autoStart`/`sharedTicker`. Both are applied AFTER the
|
|
@@ -148,62 +163,92 @@ export function createPixiReactAdapter(options) {
|
|
|
148
163
|
autoStart: false,
|
|
149
164
|
sharedTicker: false,
|
|
150
165
|
};
|
|
151
|
-
//
|
|
152
|
-
//
|
|
153
|
-
//
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
const fail = (why) => {
|
|
162
|
-
cleanup();
|
|
163
|
-
try {
|
|
164
|
-
app.destroy(false, { children: true });
|
|
165
|
-
}
|
|
166
|
-
catch {
|
|
167
|
-
/* the world never fully came up; teardown failure must not mask why */
|
|
168
|
-
}
|
|
169
|
-
runtime?.dispose();
|
|
170
|
-
reject(new Error(`createPixiReactAdapter: root "${id}" — ${why}`));
|
|
171
|
-
};
|
|
172
|
-
const onError = (event) => fail(`the Pixi tree crashed before its first commit — ${event.message} ` +
|
|
166
|
+
// Install the reconcile-error listener BEFORE `root.render`: Pixi hands
|
|
167
|
+
// the Application back after `init()` but React can already have thrown
|
|
168
|
+
// during that same turn. Attaching after the await loses the real error
|
|
169
|
+
// and turns it into a misleading ten-second timeout.
|
|
170
|
+
let reportReconcileFailure;
|
|
171
|
+
const reconcileFailure = new Promise((resolve) => {
|
|
172
|
+
reportReconcileFailure = resolve;
|
|
173
|
+
});
|
|
174
|
+
const onError = (event) => {
|
|
175
|
+
reportReconcileFailure(`the Pixi tree crashed before its first commit — ${event.message} ` +
|
|
173
176
|
'(mount() fails loudly instead of hanging)');
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
177
|
+
};
|
|
178
|
+
globalThis.addEventListener?.('error', onError);
|
|
179
|
+
let app;
|
|
180
|
+
let timer;
|
|
181
|
+
try {
|
|
182
|
+
// `root.render` is async: it awaits `Application.init()` (which is what
|
|
183
|
+
// creates the renderer) and only then hands the tree to the reconciler.
|
|
184
|
+
// A crash inside init rejects here, which is the loud failure we want.
|
|
185
|
+
const renderedApp = await root.render(element, initOptions);
|
|
186
|
+
app = renderedApp;
|
|
187
|
+
runtime?.setApplication(renderedApp);
|
|
188
|
+
// A reconcile-time crash (e.g. an un-extended component) surfaces as
|
|
189
|
+
// an uncaught window error and the first commit never lands. Race that
|
|
190
|
+
// exact signal against the commit and the last-resort ceiling.
|
|
191
|
+
const timeout = new Promise((resolve) => {
|
|
192
|
+
timer = setTimeout(() => resolve(`no first commit within ${FIRST_COMMIT_TIMEOUT_MS / 1000}s ` +
|
|
193
|
+
'(mount() fails loudly instead of hanging)'), FIRST_COMMIT_TIMEOUT_MS);
|
|
184
194
|
});
|
|
185
|
-
|
|
195
|
+
const failure = await Promise.race([
|
|
196
|
+
Promise.all([committed, effectsReady]).then(() => null),
|
|
197
|
+
reconcileFailure,
|
|
198
|
+
timeout,
|
|
199
|
+
]);
|
|
200
|
+
if (failure !== null) {
|
|
201
|
+
throw new Error(`createPixiReactAdapter: root "${id}" — ${failure}`);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
catch (error) {
|
|
205
|
+
try {
|
|
206
|
+
app?.destroy(false, { children: true });
|
|
207
|
+
}
|
|
208
|
+
catch {
|
|
209
|
+
/* the world never fully came up; teardown failure must not mask why */
|
|
210
|
+
}
|
|
211
|
+
runtime?.dispose();
|
|
212
|
+
throw error;
|
|
213
|
+
}
|
|
214
|
+
finally {
|
|
215
|
+
if (timer !== undefined)
|
|
216
|
+
clearTimeout(timer);
|
|
217
|
+
globalThis.removeEventListener?.('error', onError);
|
|
218
|
+
}
|
|
219
|
+
// `app` is assigned before the first-commit race. Reaching here proves
|
|
220
|
+
// both initialization and commit succeeded, so narrow once for the live
|
|
221
|
+
// mounted-root methods below.
|
|
222
|
+
if (app === undefined) {
|
|
223
|
+
runtime?.dispose();
|
|
224
|
+
throw new Error(`createPixiReactAdapter: root "${id}" initialized without an Application`);
|
|
225
|
+
}
|
|
226
|
+
const mountedApp = app;
|
|
186
227
|
// Pin the ticker's clock to GAME time. `Ticker.lastTime` starts at -1, so
|
|
187
228
|
// without this the first `update()` would report a 1ms phantom delta on
|
|
188
229
|
// top of the real one. From here every `deltaMS` a `useTick` callback
|
|
189
230
|
// sees is exactly the `dt` the host handed us — no wall clock anywhere,
|
|
190
231
|
// which is what makes a paused world's resume frame ordinary rather than
|
|
191
232
|
// one giant catch-up step.
|
|
192
|
-
|
|
233
|
+
mountedApp.ticker.lastTime = 0;
|
|
193
234
|
let elapsedMs = 0;
|
|
194
235
|
let disposed = false;
|
|
195
236
|
const registry = host.game ? getDebugRegistry(host.game) : null;
|
|
196
237
|
const systemAdapters = runtime?.systemAdapters ?? (registry ? { debug: registry.adapter } : {});
|
|
238
|
+
const disposeComplete = unmounted.then(() => {
|
|
239
|
+
mountedApp.destroy(false, { children: true });
|
|
240
|
+
});
|
|
197
241
|
return {
|
|
198
242
|
kind: 'canvas',
|
|
199
243
|
// The reconciler's real root container — the same `PIXI.Container`
|
|
200
244
|
// `RootInstance.pixiStage()` hands the editor.
|
|
201
|
-
stage:
|
|
245
|
+
stage: mountedApp.stage,
|
|
202
246
|
drivesOwnLoop: false,
|
|
203
247
|
// Adapter surface: the host's shared debug registry. A native component
|
|
204
248
|
// tree registers nothing; its entry-module `debug` export is projected
|
|
205
249
|
// after mount by the shared native adapter.
|
|
206
250
|
systems: systemAdapters,
|
|
251
|
+
disposeComplete,
|
|
207
252
|
update(dt) {
|
|
208
253
|
if (disposed)
|
|
209
254
|
return;
|
|
@@ -212,7 +257,7 @@ export function createPixiReactAdapter(options) {
|
|
|
212
257
|
// the native path has none. The real Pixi ticker remains the one
|
|
213
258
|
// scheduler `useTick` observes, and the host only gates/advances it.
|
|
214
259
|
runtime?.systems.run(dt);
|
|
215
|
-
|
|
260
|
+
mountedApp.ticker.update(elapsedMs);
|
|
216
261
|
},
|
|
217
262
|
resize(width, height) {
|
|
218
263
|
if (disposed)
|
|
@@ -220,12 +265,19 @@ export function createPixiReactAdapter(options) {
|
|
|
220
265
|
// `autoDensity: true` makes Pixi re-stamp `canvas.style.width`/
|
|
221
266
|
// `.height` from this call, so the on-screen box follows the logical
|
|
222
267
|
// size with no explicit CSS write from the host.
|
|
223
|
-
|
|
268
|
+
mountedApp.renderer.resize(width, height);
|
|
224
269
|
},
|
|
225
270
|
dispose() {
|
|
226
271
|
if (disposed)
|
|
227
272
|
return;
|
|
228
273
|
disposed = true;
|
|
274
|
+
// Pixi's EventSystem owns document.pointermove + window.pointerup
|
|
275
|
+
// (and its event ticker's global listener). React's deletion commit
|
|
276
|
+
// is asynchronous, so waiting to destroy the Application leaves
|
|
277
|
+
// those listeners live when the host audits this game realm. Detach
|
|
278
|
+
// the input target synchronously; the later Application.destroy()
|
|
279
|
+
// repeats this idempotently after every useTick cleanup has landed.
|
|
280
|
+
mountedApp.renderer.events.setTargetElement(null);
|
|
229
281
|
// Rendering `null` children is the only unmount path `@pixi/react`
|
|
230
282
|
// exposes publicly (its `unmountRoot` helper is internal), and React
|
|
231
283
|
// commits that deletion on its own schedule — NOT synchronously. So
|
|
@@ -234,7 +286,6 @@ export function createPixiReactAdapter(options) {
|
|
|
234
286
|
// a ticker destroyed before it lands throws inside React's commit.
|
|
235
287
|
// `removeView` stays false — the canvas belongs to the HOST.
|
|
236
288
|
void root.render(null, initOptions);
|
|
237
|
-
void unmounted.then(() => app.destroy(false, { children: true }));
|
|
238
289
|
runtime?.dispose();
|
|
239
290
|
},
|
|
240
291
|
};
|
package/dist/data/curve.d.ts
CHANGED
|
@@ -93,7 +93,7 @@ export declare function curve(axes: CurveAxes): z.ZodType<CurveValue>;
|
|
|
93
93
|
* Read a curve field's declared axes back off a LIVE Zod schema (as opposed to
|
|
94
94
|
* the emitted JSON Schema, which the editor's Data panel reads instead).
|
|
95
95
|
*
|
|
96
|
-
* This is the dev-
|
|
96
|
+
* This is the dev-tools capability's detection door: it derives its rows by
|
|
97
97
|
* walking the game's own `TuningSchema` object, so it needs the axes from the
|
|
98
98
|
* schema in hand. Wrappers (`.optional()`, `.default(…)`, `.describe(…)` chains
|
|
99
99
|
* that re-wrap) hide the metadata behind an inner type, so a bounded unwrap
|
package/dist/data/curve.js
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* update, the same way it reads any other tuning value.
|
|
35
35
|
*/
|
|
36
36
|
import { z } from 'zod';
|
|
37
|
-
/** How the marker rides out to the emitted JSON Schema — the editor's
|
|
37
|
+
/** How the marker rides out to the emitted JSON Schema — the editor's detection key, the exact shape `dataRef` uses with `x-vgai-ref`. */
|
|
38
38
|
const CURVE_META_KEY = 'x-vgai-curve';
|
|
39
39
|
function axisLabel(axes, axis) {
|
|
40
40
|
return axes[axis].label ?? axis;
|
|
@@ -122,7 +122,7 @@ export function curve(axes) {
|
|
|
122
122
|
* Read a curve field's declared axes back off a LIVE Zod schema (as opposed to
|
|
123
123
|
* the emitted JSON Schema, which the editor's Data panel reads instead).
|
|
124
124
|
*
|
|
125
|
-
* This is the dev-
|
|
125
|
+
* This is the dev-tools capability's detection door: it derives its rows by
|
|
126
126
|
* walking the game's own `TuningSchema` object, so it needs the axes from the
|
|
127
127
|
* schema in hand. Wrappers (`.optional()`, `.default(…)`, `.describe(…)` chains
|
|
128
128
|
* that re-wrap) hide the metadata behind an inner type, so a bounded unwrap
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
* game registry.
|
|
26
26
|
*
|
|
27
27
|
* ── THE DOOR ────────────────────────────────────────────────────────────────
|
|
28
|
-
* This module is IMPLEMENTATION ONLY. It publishes nothing itself: the dev-
|
|
29
|
-
* capability's own registry adopts this list (`
|
|
28
|
+
* This module is IMPLEMENTATION ONLY. It publishes nothing itself: the dev-tools
|
|
29
|
+
* capability's own registry adopts this list (`installDevToolsInstruments`) and
|
|
30
30
|
* publishes each instrument through the SAME door every declaration in that
|
|
31
31
|
* capability uses — one provider per reading (`instrument.timescale`), one
|
|
32
|
-
* command per action (`instrument.timescale.set`), plus the `dev-
|
|
32
|
+
* command per action (`instrument.timescale.set`), plus the `dev-tools` index
|
|
33
33
|
* provider. That is deliberate and load-bearing: the registry IS the product,
|
|
34
34
|
* so every reader of an instrument reaches the SAME registration.
|
|
35
35
|
*
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
* ── RESOURCE OWNERSHIP, STATED ONCE ─────────────────────────────────────────
|
|
44
44
|
* {@link createDevInstruments} owns everything it allocates: the frame-time
|
|
45
45
|
* ring buffer and its ONE `game.onRenderStep` subscription. SHARER: the
|
|
46
|
-
* dev-
|
|
46
|
+
* dev-tools capability's `DevToolsBridge`, which creates one set per mounted
|
|
47
47
|
* game. TEARDOWN: the returned {@link DevInstrumentSet.dispose} — the ONE path
|
|
48
48
|
* that ends it. Nothing else here holds a resource; the time-scale, pause and
|
|
49
49
|
* collider instruments only drive state that `Game` already owns.
|
package/dist/dev/instruments.js
CHANGED
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
* game registry.
|
|
26
26
|
*
|
|
27
27
|
* ── THE DOOR ────────────────────────────────────────────────────────────────
|
|
28
|
-
* This module is IMPLEMENTATION ONLY. It publishes nothing itself: the dev-
|
|
29
|
-
* capability's own registry adopts this list (`
|
|
28
|
+
* This module is IMPLEMENTATION ONLY. It publishes nothing itself: the dev-tools
|
|
29
|
+
* capability's own registry adopts this list (`installDevToolsInstruments`) and
|
|
30
30
|
* publishes each instrument through the SAME door every declaration in that
|
|
31
31
|
* capability uses — one provider per reading (`instrument.timescale`), one
|
|
32
|
-
* command per action (`instrument.timescale.set`), plus the `dev-
|
|
32
|
+
* command per action (`instrument.timescale.set`), plus the `dev-tools` index
|
|
33
33
|
* provider. That is deliberate and load-bearing: the registry IS the product,
|
|
34
34
|
* so every reader of an instrument reaches the SAME registration.
|
|
35
35
|
*
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
* ── RESOURCE OWNERSHIP, STATED ONCE ─────────────────────────────────────────
|
|
44
44
|
* {@link createDevInstruments} owns everything it allocates: the frame-time
|
|
45
45
|
* ring buffer and its ONE `game.onRenderStep` subscription. SHARER: the
|
|
46
|
-
* dev-
|
|
46
|
+
* dev-tools capability's `DevToolsBridge`, which creates one set per mounted
|
|
47
47
|
* game. TEARDOWN: the returned {@link DevInstrumentSet.dispose} — the ONE path
|
|
48
48
|
* that ends it. Nothing else here holds a resource; the time-scale, pause and
|
|
49
49
|
* collider instruments only drive state that `Game` already owns.
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
* the drawing buffer halves was never fill-bound.
|
|
37
37
|
*
|
|
38
38
|
* ── GATING ──────────────────────────────────────────────────────────────────
|
|
39
|
-
* The caller gates. Both seeders call this only under `
|
|
40
|
-
* (`runtime/dev-
|
|
39
|
+
* The caller gates. Both seeders call this only under `devBuildEnabled()`
|
|
40
|
+
* (`runtime/dev-build.ts` — the ONE owner of "is this a dev context"), so a
|
|
41
41
|
* ship build registers nothing and pays nothing. Each also requires a `Game`
|
|
42
42
|
* shell (there is no profiler to fold without one) and a non-headless mount
|
|
43
43
|
* (nothing brackets a submission, so the readings could only ever be empty).
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
* the drawing buffer halves was never fill-bound.
|
|
37
37
|
*
|
|
38
38
|
* ── GATING ──────────────────────────────────────────────────────────────────
|
|
39
|
-
* The caller gates. Both seeders call this only under `
|
|
40
|
-
* (`runtime/dev-
|
|
39
|
+
* The caller gates. Both seeders call this only under `devBuildEnabled()`
|
|
40
|
+
* (`runtime/dev-build.ts` — the ONE owner of "is this a dev context"), so a
|
|
41
41
|
* ship build registers nothing and pays nothing. Each also requires a `Game`
|
|
42
42
|
* shell (there is no profiler to fold without one) and a non-headless mount
|
|
43
43
|
* (nothing brackets a submission, so the readings could only ever be empty).
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* require someone to ASK, and both require that someone to already know that
|
|
7
7
|
* static batching exists, is possible here, and is spelled `<Frozen>`. An
|
|
8
8
|
* agent building a game does not know any of that, so the measurement has to
|
|
9
|
-
* do the routing itself — the same idiom as
|
|
9
|
+
* do the routing itself — the same idiom as dev-tools' unconfigured-section
|
|
10
10
|
* warning: the reading names the exact edit.
|
|
11
11
|
*
|
|
12
12
|
* ── THE DECISION IS PURE, THE SCHEDULE IS NOT ───────────────────────────────
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* require someone to ASK, and both require that someone to already know that
|
|
7
7
|
* static batching exists, is possible here, and is spelled `<Frozen>`. An
|
|
8
8
|
* agent building a game does not know any of that, so the measurement has to
|
|
9
|
-
* do the routing itself — the same idiom as
|
|
9
|
+
* do the routing itself — the same idiom as dev-tools' unconfigured-section
|
|
10
10
|
* warning: the reading names the exact edit.
|
|
11
11
|
*
|
|
12
12
|
* ── THE DECISION IS PURE, THE SCHEDULE IS NOT ───────────────────────────────
|
|
@@ -106,7 +106,7 @@ export function decideStaticBatchAdvisory(input) {
|
|
|
106
106
|
* Once per PAGE, not once per module evaluation — a hot reload re-runs this
|
|
107
107
|
* module, and an advisory that reappears on every save is one that gets muted
|
|
108
108
|
* along with everything else on the console. Same mechanism, and the same
|
|
109
|
-
* reason, as
|
|
109
|
+
* reason, as dev-tools' unconfigured-section warning.
|
|
110
110
|
*/
|
|
111
111
|
const WARNED_KEY = '__vgaiStaticBatchAdvised';
|
|
112
112
|
function alreadyWarned() {
|
|
@@ -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,o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,EAAE,CAAC,CAAC;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,QA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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
|
}
|
|
@@ -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
|
|
@@ -504,7 +483,7 @@ export const GameManifestSchema = z
|
|
|
504
483
|
antialias: z
|
|
505
484
|
.boolean()
|
|
506
485
|
.describe('Whether every three root is built with a multisampled drawing buffer. This is the ' +
|
|
507
|
-
'ONE render property a world cannot declare for itself (
|
|
486
|
+
'ONE render property a world cannot declare for itself (adapter/' +
|
|
508
487
|
'renderer-config.ts): a WebGL context fixes its sample count at CREATION from this ' +
|
|
509
488
|
'boolean, long before a world mounts, so it belongs to the PROJECT. The runtime ' +
|
|
510
489
|
'reader is mount-manifest.ts, which threads it into createHostRenderer for each ' +
|
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;
|