@threenative/core 0.3.6 → 0.3.9

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.
Files changed (137) hide show
  1. package/README.md +3 -5
  2. package/capabilities.json +739 -50
  3. package/dist/{assets-CqvE429w.d.ts → assets-YUbXa3-Y.d.ts} +101 -2
  4. package/dist/{canvas-layer-C1-5CviZ.d.ts → canvas-layer-vCtanIeB.d.ts} +1 -1
  5. package/dist/{game-Jz4Fdoeb.d.ts → game-cb99J-YE.d.ts} +100 -31
  6. package/dist/hot.d.ts +4 -4
  7. package/dist/hot.js +23 -5
  8. package/dist/index.d.ts +1742 -29
  9. package/dist/index.js +22443 -12423
  10. package/dist/{model-lod-BDAUYgsS.d.ts → model-lod-CTpZ6imz.d.ts} +1 -1
  11. package/dist/net.js +39 -12
  12. package/dist/playtest.d.ts +4 -4
  13. package/dist/playtest.js +48 -9
  14. package/dist/react-css.js +23 -0
  15. package/dist/react.d.ts +2 -2
  16. package/dist/{renderer-9yEo9hPa.d.ts → renderer-rZm0hVqq.d.ts} +178 -5
  17. package/dist/ui-layer.d.ts +11 -2
  18. package/dist/ui-layer.js +76 -4
  19. package/dist/worker.d.ts +36 -0
  20. package/dist/worker.js +1088 -0
  21. package/dist/world.d.ts +11 -3
  22. package/dist/world.js +1117 -197
  23. package/mcp/animation-server.mjs +265 -0
  24. package/mcp/animation.mjs +22 -0
  25. package/mcp/call.mjs +105 -0
  26. package/mcp/devtools.mjs +5 -0
  27. package/mcp/engine-server.mjs +713 -37
  28. package/mcp/launch.mjs +3 -2
  29. package/mcp/servers.d.mts +2 -0
  30. package/mcp/servers.mjs +33 -8
  31. package/package.json +12 -8
  32. package/patches/three@0.185.1-prd269-upgrade.patch +308 -0
  33. package/patches/three@0.185.1.patch +481 -272
  34. package/src/animation-packet-state.ts +88 -0
  35. package/src/animation-pose-packet.ts +537 -0
  36. package/src/animation.ts +779 -31
  37. package/src/asset-cache.ts +719 -0
  38. package/src/assets.ts +521 -152
  39. package/src/audio.ts +29 -3
  40. package/src/auto-batch.ts +792 -0
  41. package/src/config.ts +2 -0
  42. package/src/frame-budget.ts +268 -2
  43. package/src/game.ts +525 -105
  44. package/src/grounding.ts +7 -6
  45. package/src/hot.ts +19 -5
  46. package/src/index.ts +381 -6
  47. package/src/input.ts +21 -2
  48. package/src/interpolation.ts +19 -1
  49. package/src/launch-diagnostics.ts +7 -2
  50. package/src/look/ao-multibounce.ts +29 -0
  51. package/src/look/ao-reach.ts +39 -0
  52. package/src/look/auto-exposure.ts +264 -0
  53. package/src/look/default-tone-mapping.ts +44 -0
  54. package/src/look/exposure-graph.ts +208 -0
  55. package/src/look/exposure-readback.ts +97 -0
  56. package/src/look/exposure-settings.ts +132 -0
  57. package/src/look/filmic-tone-mapping.ts +852 -0
  58. package/src/look/gi-registry.ts +55 -0
  59. package/src/look/local-exposure.ts +507 -0
  60. package/src/look/look-diagnostics.ts +24 -0
  61. package/src/look/motion-blur.ts +42 -0
  62. package/src/look/quality.ts +309 -0
  63. package/src/look/reflection-trace.ts +344 -0
  64. package/src/look/unreal-bloom.ts +295 -0
  65. package/src/look/vignette.ts +14 -0
  66. package/src/look/world-environment.ts +2033 -0
  67. package/src/loop.ts +25 -1
  68. package/src/merge-parts.ts +25 -10
  69. package/src/model-lod.ts +14 -0
  70. package/src/net-session.ts +58 -14
  71. package/src/ocean/spectral.ts +41 -7
  72. package/src/picking.ts +72 -5
  73. package/src/platform.ts +29 -1
  74. package/src/playtest.ts +54 -8
  75. package/src/profiling/FrameCounters.ts +166 -5
  76. package/src/profiling/FrameStages.ts +289 -0
  77. package/src/profiling/Spans.ts +39 -25
  78. package/src/profiling/debug-telemetry.ts +312 -0
  79. package/src/profiling/scene-warning.ts +42 -6
  80. package/src/projection-apply.ts +11 -3
  81. package/src/projection-content.ts +189 -0
  82. package/src/projection-marker.ts +6 -2
  83. package/src/projection-plan.ts +279 -28
  84. package/src/projection-skinned.ts +620 -5
  85. package/src/projection-stability.ts +16 -0
  86. package/src/projection-uniform.ts +5 -1
  87. package/src/quiet-markers.ts +56 -0
  88. package/src/render/budget-ladder.ts +256 -0
  89. package/src/render/chain.ts +89 -7
  90. package/src/render/exposure-units.ts +59 -0
  91. package/src/render/frame-time-budget.ts +162 -0
  92. package/src/render/gi-budget.ts +231 -0
  93. package/src/render/gi-visualize.ts +49 -0
  94. package/src/render/material-key.ts +1 -0
  95. package/src/render/probe-volume.ts +196 -36
  96. package/src/render/rough-diffuse.ts +177 -0
  97. package/src/render/scene-trace.ts +532 -0
  98. package/src/render/shadow-filter-budget.ts +237 -0
  99. package/src/render/sky-capture.ts +194 -0
  100. package/src/render/soft-shadow.ts +607 -0
  101. package/src/render/surface-cache.ts +418 -0
  102. package/src/render/traced-reflections.ts +408 -0
  103. package/src/render/two-sided-foliage.ts +120 -0
  104. package/src/render/virtual-shadow-pages.ts +112 -12
  105. package/src/render/virtual-shadow.ts +386 -38
  106. package/src/render-camera-cull.ts +536 -31
  107. package/src/render-pass-budget.ts +140 -22
  108. package/src/renderProjection.ts +65 -9
  109. package/src/renderer-config.ts +3 -2
  110. package/src/renderer.ts +289 -14
  111. package/src/resolution-scaler.ts +65 -7
  112. package/src/skeletal-mesh.ts +4 -0
  113. package/src/snow-field.ts +46 -0
  114. package/src/softbody.ts +6 -5
  115. package/src/startup-offscreen-bytes.ts +168 -0
  116. package/src/startup-readiness.ts +137 -2
  117. package/src/ui-bridge.ts +38 -0
  118. package/src/ui-hit-regions.ts +6 -2
  119. package/src/ui-layer.ts +1 -0
  120. package/src/ui-state.ts +32 -3
  121. package/src/version.ts +1 -1
  122. package/src/viewport.ts +8 -5
  123. package/src/warmup.ts +76 -10
  124. package/src/worker-audio.ts +579 -0
  125. package/src/worker.ts +842 -0
  126. package/src/world-cells.ts +4 -1
  127. package/gpl/LICENSE.GPL +0 -117
  128. package/gpl/convert.py +0 -192
  129. package/gpl/fixtures/make_world_fixture.py +0 -184
  130. package/gpl/recipes/_common.py +0 -180
  131. package/gpl/recipes/bake_ao.py +0 -111
  132. package/gpl/recipes/decimate.py +0 -70
  133. package/gpl/recipes/export_world.py +0 -699
  134. package/gpl/recipes/retarget.py +0 -131
  135. package/gpl/recipes/unwrap.py +0 -71
  136. package/mcp/blender-server.mjs +0 -689
  137. package/mcp/blender.mjs +0 -26
@@ -1,5 +1,5 @@
1
1
  import { Camera, Object3D, Mesh, BufferGeometry } from 'three';
2
- import { I as IRendererLike, a as IFrameBudgetWindow, b as IFrameBudgetSimulation } from './renderer-9yEo9hPa.js';
2
+ import { I as IRendererLike, a as IFrameBudgetWindow, b as IFrameBudgetSimulation } from './renderer-rZm0hVqq.js';
3
3
 
4
4
  /** One simulation that can yield its compute work. */
5
5
  interface IBudgetCandidate {
package/dist/net.js CHANGED
@@ -267,6 +267,12 @@ async function openConnection(url, normalized) {
267
267
  });
268
268
  try {
269
269
  await Promise.race([Promise.resolve(transport.ready), deadline, cancelled]);
270
+ } catch (error) {
271
+ try {
272
+ transport.close();
273
+ } catch {
274
+ }
275
+ throw error;
270
276
  } finally {
271
277
  if (timeoutId !== void 0) clearTimeout(timeoutId);
272
278
  normalized.signal?.removeEventListener("abort", onAbort);
@@ -276,11 +282,24 @@ async function openConnection(url, normalized) {
276
282
  }
277
283
  async function establishSession(transport, normalized) {
278
284
  const abort = new AbortController();
279
- const timer = setTimeout(() => abort.abort(), normalized.connectTimeoutMs);
285
+ let timedOut = false;
286
+ const timer = setTimeout(() => {
287
+ timedOut = true;
288
+ abort.abort();
289
+ }, normalized.connectTimeoutMs);
290
+ const onCallerAbort = () => abort.abort();
291
+ normalized.signal?.addEventListener("abort", onCallerAbort, { once: true });
292
+ const interrupted = new Promise((_, reject) => {
293
+ const fail = () => reject(new Error("TN_NET_INTERRUPTED: establishment aborted"));
294
+ if (abort.signal.aborted) fail();
295
+ else abort.signal.addEventListener("abort", fail, { once: true });
296
+ });
297
+ interrupted.catch(() => void 0);
298
+ const bounded = (operation) => Promise.race([Promise.resolve(operation), interrupted]);
280
299
  const readers = [];
281
300
  const writers = [];
282
301
  try {
283
- const controlStream = await Promise.resolve(transport.createBidirectionalStream());
302
+ const controlStream = await bounded(transport.createBidirectionalStream());
284
303
  writers.push(controlStream.writable);
285
304
  const controlReader = new FrameReader(controlStream.readable, MAX_HELLO_BYTES);
286
305
  readers.push(controlReader);
@@ -299,7 +318,7 @@ async function establishSession(transport, normalized) {
299
318
  );
300
319
  if (helloPayload.length > MAX_HELLO_BYTES)
301
320
  throw invalidArgument("handshake payload exceeds 4096 bytes");
302
- await writeAll(controlStream.writable, encodeFrame(KIND_HELLO, 0, helloPayload));
321
+ await bounded(writeAll(controlStream.writable, encodeFrame(KIND_HELLO, 0, helloPayload)));
303
322
  const welcomeFrame = await controlReader.nextFrame(abort.signal);
304
323
  if (welcomeFrame.kind !== KIND_WELCOME || welcomeFrame.channel !== 0)
305
324
  throw new Error("TN_NET_PROTOCOL: expected WELCOME");
@@ -323,11 +342,13 @@ async function establishSession(transport, normalized) {
323
342
  const reliableReaders = /* @__PURE__ */ new Map();
324
343
  const reliableWriters = /* @__PURE__ */ new Map();
325
344
  for (const channelId of reliableIds) {
326
- const stream = await Promise.resolve(transport.createBidirectionalStream());
345
+ const stream = await bounded(transport.createBidirectionalStream());
327
346
  writers.push(stream.writable);
328
347
  const reader = new FrameReader(stream.readable, messageLimit);
329
348
  readers.push(reader);
330
- await writeAll(stream.writable, encodeFrame(KIND_BIND, channelId, new Uint8Array(0)));
349
+ await bounded(
350
+ writeAll(stream.writable, encodeFrame(KIND_BIND, channelId, new Uint8Array(0)))
351
+ );
331
352
  const bound = await reader.nextFrame(abort.signal);
332
353
  if (bound.kind !== KIND_BOUND || bound.channel !== channelId)
333
354
  throw new Error("TN_NET_PROTOCOL: expected BOUND");
@@ -336,6 +357,7 @@ async function establishSession(transport, normalized) {
336
357
  reliableWriters.set(channelId, stream.writable);
337
358
  }
338
359
  clearTimeout(timer);
360
+ normalized.signal?.removeEventListener("abort", onCallerAbort);
339
361
  return createConnection({
340
362
  transport,
341
363
  channelById: new Map(normalized.channels.map((channel) => [channel.id, channel.delivery])),
@@ -350,9 +372,13 @@ async function establishSession(transport, normalized) {
350
372
  });
351
373
  } catch (error) {
352
374
  clearTimeout(timer);
375
+ normalized.signal?.removeEventListener("abort", onCallerAbort);
353
376
  abort.abort();
354
377
  for (const reader of readers) {
355
- await reader.cancel(error);
378
+ await Promise.race([
379
+ reader.cancel(error).catch(() => void 0),
380
+ new Promise((resolve) => setTimeout(resolve, 50))
381
+ ]);
356
382
  reader.release();
357
383
  }
358
384
  try {
@@ -360,6 +386,7 @@ async function establishSession(transport, normalized) {
360
386
  } catch {
361
387
  }
362
388
  if (normalized.signal?.aborted) throw new Error("TN_NET_CANCELLED: aborted");
389
+ if (timedOut) throw new Error("TN_NET_TIMEOUT: connect timed out");
363
390
  if (error instanceof Error && error.message.startsWith("TN_NET_")) throw error;
364
391
  if (error instanceof Error) throw new Error(`TN_NET_PROTOCOL: ${error.message}`);
365
392
  throw new Error("TN_NET_UNAVAILABLE: handshake failed");
@@ -408,7 +435,6 @@ function createConnection(established) {
408
435
  const enqueueReceived = (channel, data) => {
409
436
  const delivery = established.channelById.get(channel);
410
437
  if (delivery === "reliable-ordered") {
411
- if (queuedReliableBytesReceived + data.length > established.maxQueuedReliableBytes) return;
412
438
  queuedReliableBytesReceived += data.length;
413
439
  receiveQueue.push({ channel, data });
414
440
  return;
@@ -434,14 +460,15 @@ function createConnection(established) {
434
460
  try {
435
461
  for (; ; ) {
436
462
  if (state !== "connected") return;
437
- if (queuedReliableBytesReceived >= established.maxQueuedReliableBytes) {
438
- await new Promise((resolve) => setTimeout(resolve, 5));
439
- continue;
440
- }
441
463
  const frame = await reader.nextFrame();
442
464
  if (frame.kind !== KIND_DATA || frame.channel !== channelId)
443
465
  throw new Error("TN_NET_PROTOCOL: wrong stream frame");
444
- enqueueReceived(frame.channel, frame.payload.slice());
466
+ const payload = frame.payload.slice();
467
+ while (state === "connected" && queuedReliableBytesReceived + payload.length > established.maxQueuedReliableBytes) {
468
+ await new Promise((resolve) => setTimeout(resolve, 5));
469
+ }
470
+ if (state !== "connected") return;
471
+ enqueueReceived(frame.channel, payload);
445
472
  }
446
473
  } catch {
447
474
  if (state === "connected") markDisconnected("transport error");
@@ -1,11 +1,11 @@
1
1
  import { JsonValue, JsonPrimitive } from '@threenative/playtest/protocol';
2
2
  export { PLAYTEST_CLOCK_GLOBAL } from '@threenative/playtest/protocol';
3
- import { a as IGamePluginHooks } from './game-Jz4Fdoeb.js';
4
- import './assets-CqvE429w.js';
3
+ import { a as IGamePluginHooks } from './game-cb99J-YE.js';
4
+ import './assets-YUbXa3-Y.js';
5
5
  import 'three';
6
- import './renderer-9yEo9hPa.js';
6
+ import './renderer-rZm0hVqq.js';
7
7
  import 'three/webgpu';
8
- import './canvas-layer-C1-5CviZ.js';
8
+ import './canvas-layer-vCtanIeB.js';
9
9
  import 'zustand/vanilla';
10
10
 
11
11
  /**
package/dist/playtest.js CHANGED
@@ -43,11 +43,16 @@ new Vector3();
43
43
  new Vector3();
44
44
 
45
45
  // src/version.ts
46
- var CORE_VERSION = "0.3.6";
46
+ var CORE_VERSION = "0.3.9";
47
47
 
48
48
  // src/pipeline-census.ts
49
49
  var PIPELINE_CENSUS_CAPABILITY = "runtime.pipelineCensus";
50
50
 
51
+ // src/profiling/FrameCounters.ts
52
+ function discardEngineCountsSinceLastFrame(host = globalThis) {
53
+ host.__tnEngineCounterRebase?.();
54
+ }
55
+
51
56
  // src/render/chain.ts
52
57
  var REPORT_KEY = /* @__PURE__ */ Symbol.for("threenative.renderChain.report");
53
58
  function storedReport(target) {
@@ -156,9 +161,14 @@ function playtest(options = {}) {
156
161
  progress: ctx.startup.progress,
157
162
  ...ctx.startup.warmup === void 0 ? {} : { warmup: ctx.startup.warmup },
158
163
  ...runtime?.startupCompileSettled === void 0 ? {} : { compileSettled: runtime.startupCompileSettled() },
164
+ ...runtime?.startupRevealed === void 0 ? {} : { revealed: runtime.startupRevealed() },
159
165
  // Wall-clock milestones, so a scenario asserts startup time as an observation instead
160
166
  // of reading it off a console marker after the fact.
161
- ...runtime?.startupTimeline === void 0 ? {} : { timeline: runtime.startupTimeline() }
167
+ ...runtime?.startupTimeline === void 0 ? {} : { timeline: runtime.startupTimeline() },
168
+ // What the reveal waited for that the spawn camera does not show, once the reveal ran.
169
+ ...((offscreen) => offscreen === void 0 ? {} : {
170
+ offscreenBytes: { ...offscreen, top: offscreen.top.map((file) => ({ ...file })) }
171
+ })(runtime?.startupOffscreenBytes?.())
162
172
  })
163
173
  };
164
174
  const installation = installThreePlaytestBridge(bridgeOptions);
@@ -204,7 +214,12 @@ function playtest(options = {}) {
204
214
  if (!wallClock) runtime?.freezeClock?.();
205
215
  }
206
216
  dispose = installation.dispose;
207
- attached = holdUntilAttached(installation.bridge, options, () => startSceneEntered);
217
+ attached = holdUntilAttached(
218
+ installation.bridge,
219
+ options,
220
+ () => startSceneEntered,
221
+ runtime?.startSceneLoaded
222
+ );
208
223
  const cleanup = () => {
209
224
  if (!clockDisposed && clockRuntime?._setClockMode !== void 0)
210
225
  clockControl._setClockMode("fixed-step");
@@ -258,7 +273,7 @@ function runnerAnnounced() {
258
273
  const host = globalThis;
259
274
  return host[PLAYTEST_RUNNER_EXPECTED_GLOBAL] === true || host.TN_PLAYTEST_ENDPOINT !== void 0;
260
275
  }
261
- function holdUntilAttached(bridge, options, startSceneEntered) {
276
+ function holdUntilAttached(bridge, options, startSceneEntered, startSceneLoaded) {
262
277
  if (!shouldHoldUntilAttached(options)) return void 0;
263
278
  const timeoutMs = options.attachTimeoutMs ?? PLAYTEST_ATTACH_TIMEOUT_MS;
264
279
  if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
@@ -292,6 +307,7 @@ function holdUntilAttached(bridge, options, startSceneEntered) {
292
307
  if (applySetup !== void 0) {
293
308
  bridge.applySetup = async (request) => {
294
309
  try {
310
+ await startSceneLoaded?.();
295
311
  const confirmation = await applySetup(request);
296
312
  release();
297
313
  return confirmation;
@@ -314,9 +330,15 @@ function installRuntimeChannels(bridge, runtime) {
314
330
  (description) => addRuntimeCapabilities(description, runtime?.observations.contributions() ?? [])
315
331
  );
316
332
  const sample = bridge.sample;
317
- bridge.sample = (request) => Promise.resolve(sample(request)).then(
318
- (snapshot) => addRuntimeObservations(snapshot, request, runtime?.observations.contributions() ?? [])
319
- );
333
+ bridge.sample = (request) => Promise.resolve(sample(request)).then(async (snapshot) => {
334
+ const observed = await addRuntimeObservations(
335
+ snapshot,
336
+ request,
337
+ runtime?.observations.contributions() ?? []
338
+ );
339
+ discardEngineCountsSinceLastFrame();
340
+ return observed;
341
+ });
320
342
  }
321
343
  function addRuntimeCapabilities(description, contributions) {
322
344
  const capabilities = [...description.capabilities];
@@ -365,7 +387,8 @@ function bridgeEntities(ctx) {
365
387
  }
366
388
  function entityObject(entity) {
367
389
  if (entity instanceof Object3D) return entity;
368
- const candidate = entity?.mesh ?? entity?.object;
390
+ const roots = entity;
391
+ const candidate = roots?.mesh ?? roots?.object ?? roots?.group;
369
392
  return candidate instanceof Object3D ? candidate : void 0;
370
393
  }
371
394
  function gameplayObservations(ctx, contactHistory, seed, replayRuntime, watcher) {
@@ -410,6 +433,7 @@ function strideObservation(value) {
410
433
  return {
411
434
  clipGroundSpeed: report.clipGroundSpeed,
412
435
  groundSpeed: report.groundSpeed,
436
+ ...typeof report.inPlace === "boolean" ? { inPlace: report.inPlace } : {},
413
437
  overridden: report.overridden,
414
438
  rate: report.rate,
415
439
  synced: report.synced
@@ -500,7 +524,7 @@ function objectGraphValues(root) {
500
524
  if (value === null || typeof value !== "object" || visited.has(value)) return;
501
525
  visited.add(value);
502
526
  values.push(value);
503
- if (depth >= 4 || value instanceof Object3D) return;
527
+ if (depth >= 4 || value instanceof Object3D || ArrayBuffer.isView(value)) return;
504
528
  for (const child of Object.values(value)) visit(child, depth + 1);
505
529
  };
506
530
  visit(root, 0);
@@ -537,12 +561,27 @@ function stateResources(ctx, runtime) {
537
561
  // Where every asset was actually served from, on every target and not only in a browser
538
562
  // console log: a game whose manifest never loaded runs on the uncompiled source directory
539
563
  // and looks healthy, and without this nothing observable says so.
564
+ ["assetCache", assetCacheReport(ctx.assets)],
540
565
  ["assets", assetResolutions(ctx.assets)],
541
566
  ...runtime?.frameCounts === void 0 ? [] : [["__threenativeFrameCounts", runtime.frameCounts()]]
542
567
  ]);
543
568
  }
544
569
  };
545
570
  }
571
+ function assetCacheReport(assets) {
572
+ const cache = assets.cache;
573
+ return {
574
+ enabled: cache.enabled,
575
+ persisted: cache.persisted,
576
+ hits: cache.hits,
577
+ misses: cache.misses,
578
+ bytesOnDisk: cache.bytesOnDisk,
579
+ bytesTotal: cache.bytesTotal,
580
+ filling: cache.filling,
581
+ backgroundFill: cache.backgroundFill,
582
+ ...cache.reason === void 0 ? {} : { reason: cache.reason }
583
+ };
584
+ }
546
585
  function assetResolutions(assets) {
547
586
  const nested = {};
548
587
  for (const [logical, record] of assets.resolved) {
package/dist/react-css.js CHANGED
@@ -117,12 +117,35 @@ function installInbound(scope, key, deliver) {
117
117
  if (installed.receivers.size === 0 && scope[key] === installed.dispatch) scope[key] = void 0;
118
118
  };
119
119
  }
120
+ var LOOPBACK_KEY = "__tnUiLoopback";
121
+ function installLoopback(scope) {
122
+ const search = scope.location?.search;
123
+ if (typeof search !== "string" || new URLSearchParams(search).get("tnUiLoopback") !== "1") return;
124
+ if (scope[LOOPBACK_KEY] !== void 0) return;
125
+ const { port1: gamePort, port2: uiPort } = new MessageChannel();
126
+ const receive = (key) => (event) => scope[key]?.(event.data);
127
+ gamePort.onmessage = receive(UI_BRIDGE_GLOBALS.gameReceive);
128
+ uiPort.onmessage = receive(UI_BRIDGE_GLOBALS.uiReceive);
129
+ scope[UI_BRIDGE_GLOBALS.gamePost] = (frame) => gamePort.postMessage(frame);
130
+ scope[UI_BRIDGE_GLOBALS.uiHost] = { postMessage: (frame) => uiPort.postMessage(frame) };
131
+ scope.__tnUiOverlayAttached = () => true;
132
+ scope[LOOPBACK_KEY] = {
133
+ close() {
134
+ gamePort.close();
135
+ uiPort.close();
136
+ for (const key of [UI_BRIDGE_GLOBALS.gamePost, UI_BRIDGE_GLOBALS.uiHost, LOOPBACK_KEY])
137
+ scope[key] = void 0;
138
+ scope.__tnUiOverlayAttached = void 0;
139
+ }
140
+ };
141
+ }
120
142
  function connectUiBridge(options) {
121
143
  const { end } = options;
122
144
  if (end !== "game" && end !== "ui") {
123
145
  throw new Error(`TN_UI_BRIDGE_END_INVALID: expected 'game' or 'ui', got '${String(end)}'.`);
124
146
  }
125
147
  const scope = options.scope ?? globalThis;
148
+ installLoopback(scope);
126
149
  const listeners = /* @__PURE__ */ new Set();
127
150
  const deliver = (frame) => {
128
151
  const message = parseFrame(frame);
package/dist/react.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
- import { C as CanvasLayer } from './canvas-layer-C1-5CviZ.js';
2
+ import { C as CanvasLayer } from './canvas-layer-vCtanIeB.js';
3
3
  import 'three';
4
- import './renderer-9yEo9hPa.js';
4
+ import './renderer-rZm0hVqq.js';
5
5
  import 'three/webgpu';
6
6
 
7
7
  /**
@@ -37,6 +37,21 @@ interface IFrameCounters {
37
37
  readonly gpuBytes?: number;
38
38
  readonly hostCalls?: number;
39
39
  readonly jsAllocBytes?: number;
40
+ /**
41
+ * JS->Wasm crossings this frame, from the web back end's own count (`createCrossingReader`).
42
+ * Absent on a host whose back end keeps no such count.
43
+ */
44
+ readonly bridgeCrossings?: number;
45
+ /** Transforms the game moved this frame (the owned engine's `markLocalTransformDirty` calls; PRD-771). */
46
+ readonly dirtyTransforms?: number;
47
+ /** Shadow casters the virtual atlas judged moving this frame, each one invalidating its pages (PRD-771). */
48
+ readonly castersMoving?: number;
49
+ /**
50
+ * This frame's engine work counts by name (`createEngineCounterReader`): the web back end's and the
51
+ * engine's own totals, and `globalThis.__tnEngineCost`, differenced per frame. Absent unless a
52
+ * playtest asked for them.
53
+ */
54
+ readonly engine?: Readonly<Record<string, number>>;
40
55
  /** The loop's fixed-step count at the frame's end; absent when the caller did not feed one. */
41
56
  readonly simulationTick?: number;
42
57
  }
@@ -63,6 +78,37 @@ declare class FrameCounters {
63
78
  uninstall(): void;
64
79
  }
65
80
 
81
+ /**
82
+ * Where the main-thread frame goes, by stage (PRD-771).
83
+ *
84
+ * The frame budget's `render` phase wraps one synchronous `renderer.render()` call, and on the owned
85
+ * Wasm engine that call holds the scene walk, the draw plan, the encode, the post passes and the queue
86
+ * submit, all in C++. A phase that large with nothing named inside it is a question, not a measurement.
87
+ * This splits it with one clock read per boundary, so the split rides every window rather than a
88
+ * diagnostic flag:
89
+ *
90
+ * - the JS before the engine call (cull, `beforeRender`, reconcile, LOD, matrix walk) and after it;
91
+ * - the engine's own CPU stages, from the running totals the Wasm facade publishes in
92
+ * `renderer.info.engine.cpuMs` (three-native `gpu-stages.ts`), differenced per frame;
93
+ * - what is left of the call, named: JS inside `render()` around the Wasm call, and Wasm time no stage owns.
94
+ *
95
+ * The stages partition the render phase. `wasmOther` and `engineJs` are subtractions, published as
96
+ * stages (`wasmRendererGap` is what `Renderer::render` spends outside its plan and encode halves) so the unlocated time is a number and never a quiet category. On an engine that publishes no
97
+ * stage totals (upstream three), the whole call is `engineJs`.
98
+ */
99
+
100
+ /** The stages of the render phase, in the order a frame spends them. They sum to the frame's `render` phase. */
101
+ declare const RENDER_STAGES: readonly ["jsBefore", "engineJs", "wasmScene", "wasmPlan", "wasmCompute", "wasmEncode", "wasmPost", "wasmSubmit", "wasmPoll", "wasmTail", "wasmRendererGap", "wasmDatabaseGap", "wasmTargets", "wasmOther", "jsAfter"];
102
+ type RenderStage = (typeof RENDER_STAGES)[number];
103
+ /**
104
+ * Parts of a stage, published beside it and never added to the sum: `wasmPlan` holds all three, in the order the
105
+ * renderer runs them, and what is left of it is the rest of the prepare half.
106
+ */
107
+ declare const STAGE_PARTS: readonly ["planVirtualPages", "planDraws", "planShadowLists"];
108
+ type StagePart = (typeof STAGE_PARTS)[number];
109
+ /** One frame's stages in milliseconds, reused across frames so the read allocates nothing. */
110
+ type IFrameStageSample = Record<RenderStage | StagePart, number | undefined>;
111
+
66
112
  /**
67
113
  * Per-pass draw and triangle attribution, on by default, for every platform.
68
114
  *
@@ -118,6 +164,22 @@ interface IRenderPassSample {
118
164
  readonly kind: FramePassKind;
119
165
  readonly triangles: number;
120
166
  }
167
+ /**
168
+ * One resolved frame's GPU milliseconds by stage: `stages` sums the nested passes that carry the same
169
+ * scene name (three names its post passes `SSGI` and `AO`), and `total` is the whole frame.
170
+ */
171
+ interface IStageGpuReading {
172
+ readonly frame: number;
173
+ readonly stages: Readonly<Record<string, number>>;
174
+ readonly total: number;
175
+ }
176
+ /**
177
+ * The newest whole frame's GPU milliseconds by named stage on this renderer, or `undefined` before
178
+ * one resolved (or with neither a recorder installed nor an owned engine, or an adapter that grants
179
+ * no timestamp query). The `frame` number lets a reader count each resolved frame once. A stage that
180
+ * did not draw is absent.
181
+ */
182
+ declare function stageGpuReading(renderer: unknown): IStageGpuReading | undefined;
121
183
 
122
184
  type PlatformRuntime = "web" | "native";
123
185
  type PlatformOS = "android" | "ios" | "linux" | "macos" | "windows" | "unknown";
@@ -339,19 +401,29 @@ interface IFrameBudgetPassSummary {
339
401
  * it were a player's — `threenative-playtest perf` refuses to (`TN_PERF_VIRTUAL_DISPLAY`).
340
402
  */
341
403
  interface IFrameBudgetWindow {
342
- /** Browser Long Tasks, independent of vsync/GPU waits. Unavailable on hosts without this API. */
404
+ /**
405
+ * Browser Long Tasks, independent of vsync/GPU waits. Unavailable on hosts without this API.
406
+ * `count` and `longestMs` describe this window; `afterFirstFrameMs` is the run's startup figure.
407
+ */
343
408
  readonly longTasks: {
344
409
  readonly available: false;
345
410
  } | {
346
411
  readonly available: true;
412
+ /** Long Tasks observed inside this window, not since the page started. */
347
413
  readonly count: number;
414
+ /** This window's longest Long Task; 0 when it saw none. */
348
415
  readonly longestMs: number;
416
+ /** The run's longest task after the first frame: a startup number, not this window's. */
349
417
  readonly afterFirstFrameMs: number;
350
418
  };
351
419
  /** 1 for the first reported window, incrementing thereafter. */
352
420
  readonly window: number;
421
+ /** The web engine's job pool: `on (N)` workers, or `off (<reason>)`; absent off the Wasm engine. */
422
+ readonly threads?: string;
353
423
  /** Loop frames counted in this window, hitches excluded — one per present on the web. */
354
424
  readonly frames: number;
425
+ /** Debug-only elapsed time between completed report boundaries; absent on the first window. */
426
+ readonly durationMs?: number;
355
427
  /** Fixed simulation ticks in this window multiplied by the loop's step, when supplied. */
356
428
  readonly simulatedSeconds?: number;
357
429
  /** Frames excluded from the window because their present gap exceeded `hitchMs`. */
@@ -378,6 +450,16 @@ interface IFrameBudgetWindow {
378
450
  readonly presentedFps?: number;
379
451
  /** Interval between loop frames — the honest frame period where the loop presents every frame. */
380
452
  readonly presented: IFrameBudgetSummary;
453
+ /**
454
+ * Interval between frames the renderer drew. A declined frame (`renderSkips`) adds its time to the
455
+ * next drawn frame's interval, because the display showed the previous image for both. Reported
456
+ * beside `presented`, which gates keep reading; on the web this is what the player saw.
457
+ */
458
+ readonly drawn: IFrameBudgetSummary;
459
+ /** Loop frames the renderer drew: `frames - renderSkips`. */
460
+ readonly drawnFrames: number;
461
+ /** Derived from the mean `drawn` interval: drawn frames per second. */
462
+ readonly drawnFps: number;
381
463
  /** Duration of the frame callback itself, entry to exit. */
382
464
  readonly frame: IFrameBudgetSummary;
383
465
  /** Fixed simulation steps executed in the callback. */
@@ -480,6 +562,8 @@ interface IFrameBudgetWindow {
480
562
  * `gpuMain + gpuShadow + gpuOther` reconciles with `gpuMs` only when all three are present.
481
563
  */
482
564
  readonly gpuMain?: number;
565
+ /** Fresh frames in the same main-bucket ring as gpuMain; absent when unmeasured. */
566
+ readonly gpuMainSamples?: number;
483
567
  readonly gpuShadow?: number;
484
568
  readonly gpuOther?: number;
485
569
  readonly gpuCompute?: number;
@@ -518,8 +602,31 @@ interface IFrameBudgetWindow {
518
602
  readonly hostCalls?: IFrameBudgetSummary;
519
603
  readonly gpuBytes?: IFrameBudgetSummary;
520
604
  readonly jsAllocBytes?: IFrameBudgetSummary;
605
+ /** JS->Wasm crossings per frame, when the back end counts them (`createCrossingReader`). */
606
+ readonly bridgeCrossings?: IFrameBudgetSummary;
607
+ readonly dirtyTransforms?: IFrameBudgetSummary;
608
+ readonly castersMoving?: IFrameBudgetSummary;
609
+ /** Engine work counts per frame by name, when a playtest asked for them (`createEngineCounterReader`). */
610
+ readonly engine?: Readonly<Record<string, IFrameBudgetSummary>>;
521
611
  readonly simulationTick?: number;
522
612
  };
613
+ /**
614
+ * Where the callback's frame went (PRD-771), per stage in ms, one series per name. The render phase's
615
+ * stages (`RENDER_STAGES`) plus the `update`, `overlay`, `ui` and `residual` phases partition `frame`;
616
+ * `stageSum` is each frame's sum of those, so a window whose `stageSum` trails `frame` says how much
617
+ * time no stage named. `STAGE_PARTS` are pieces of `wasmPlan`, published beside it and not in the sum.
618
+ * Absent until a frame reported stages, and a name nothing measured is absent, never zero.
619
+ */
620
+ readonly stages?: Readonly<Record<string, IFrameBudgetSummary>>;
621
+ readonly stageSum?: IFrameBudgetSummary;
622
+ /**
623
+ * The mean of each stage over the window's slowest frames, the ones whose `stageSum` reaches its own p95: where
624
+ * the p95 frame goes, to read beside the stage's p50. `frames` is how many that was.
625
+ */
626
+ readonly stagesAtP95?: {
627
+ readonly frames: number;
628
+ readonly stages: Readonly<Record<string, number>>;
629
+ };
523
630
  }
524
631
  interface IFrameBudgetSimulation {
525
632
  readonly tick: () => number;
@@ -666,6 +773,11 @@ declare class FrameBudget {
666
773
  * An unknown kind throws rather than being dropped, the same fail-closed rule as a phase.
667
774
  */
668
775
  addRenderPasses(passes: readonly IRenderPassSample[]): void;
776
+ /**
777
+ * Records the frame's render-phase stages, from `createStageReader`. At most one call per frame; the
778
+ * object is read at `endFrame`, so a caller may reuse one sample across frames.
779
+ */
780
+ addStages(stages: IFrameStageSample): void;
669
781
  /**
670
782
  * Closes the frame and returns its phase split, or `undefined` when the frame was a hitch and
671
783
  * therefore excluded — a 27-second startup stall is not a frame time and must not enter a
@@ -977,6 +1089,9 @@ interface IGpuFrameObservation {
977
1089
  dispose(): void;
978
1090
  }
979
1091
 
1092
+ /** `filmic` is a fresh Unreal 5.8.3 project's curve and the default; the rest are the named overrides. */
1093
+ type RendererToneMapping = "filmic" | "aces" | "agx" | "neutral" | "none";
1094
+
980
1095
  /** The marker shared by alpha-antialiasing logs, playtests, and native diagnostics. */
981
1096
  declare const ALPHA_ANTIALIASING_MARKER = "TN_ALPHA_ANTIALIASING";
982
1097
  interface IAlphaAntialiasingReport {
@@ -1134,26 +1249,38 @@ interface IRenderChainRenderer {
1134
1249
  /** Install a graph and identify the authored world pass that follows the rendered scene root. */
1135
1250
  setOutputNode: RenderOutputSetter;
1136
1251
  }
1137
- /** Quality values are algorithm parameters, not appearance values. Templates own the latter. */
1252
+ /**
1253
+ * Quality values are algorithm parameters, not appearance values. Templates own the latter.
1254
+ *
1255
+ * `ssrMaxSteps` caps the mirror reflection march as Unreal caps it per tier (UE 5.8.3:
1256
+ * Engine/Shaders/Private/SSRT/SSRTReflections.usf:198-216, Engine/Config/BaseScalability.ini
1257
+ * `[ReflectionQuality@N]`). `high` is Epic, `r.SSR.Quality` 3: 8 steps on each of 4 rays, so the
1258
+ * one mirror ray gets the 32 steps. `medium` is Medium, quality 2: 16 steps on 1 ray. `low` takes
1259
+ * quality 1, 8 steps on 1 ray.
1260
+ */
1138
1261
  declare const RENDER_CHAIN_TIERS: {
1139
1262
  readonly high: {
1140
1263
  readonly denoiseIterations: 3;
1141
1264
  readonly sliceCount: 3;
1265
+ readonly ssrMaxSteps: 32;
1142
1266
  readonly stepCount: 16;
1143
1267
  };
1144
1268
  readonly low: {
1145
1269
  readonly denoiseIterations: 1;
1146
1270
  readonly sliceCount: 1;
1271
+ readonly ssrMaxSteps: 8;
1147
1272
  readonly stepCount: 12;
1148
1273
  };
1149
1274
  readonly medium: {
1150
1275
  readonly denoiseIterations: 2;
1151
1276
  readonly sliceCount: 2;
1277
+ readonly ssrMaxSteps: 16;
1152
1278
  readonly stepCount: 8;
1153
1279
  };
1154
1280
  readonly off: {
1155
1281
  readonly denoiseIterations: 0;
1156
1282
  readonly sliceCount: 0;
1283
+ readonly ssrMaxSteps: 0;
1157
1284
  readonly stepCount: 0;
1158
1285
  };
1159
1286
  };
@@ -1240,6 +1367,13 @@ interface IRenderChainVelocityReport {
1240
1367
  readonly measurementFrame?: number;
1241
1368
  }
1242
1369
  interface IRenderChainApplied {
1370
+ /** Actual GPU allocation sizes, absent until the owned temporal pass has rendered. */
1371
+ readonly stageSizes?: {
1372
+ readonly traa: {
1373
+ readonly input: readonly [number, number];
1374
+ readonly output: readonly [number, number];
1375
+ };
1376
+ };
1243
1377
  readonly contributions: readonly {
1244
1378
  readonly graphOutputChanged: boolean;
1245
1379
  readonly name: RenderChainStageId;
@@ -1313,6 +1447,19 @@ declare class RenderChain {
1313
1447
  dispose(): void;
1314
1448
  }
1315
1449
 
1450
+ /**
1451
+ * The renderer's own first-frame answer, with the inputs it is still short of so a launch that reached its
1452
+ * deadline can name what never arrived instead of reporting a bare timeout.
1453
+ */
1454
+ interface IStartupImageState {
1455
+ /** The renderer's answer: a world frame a player may see exists. */
1456
+ readonly ready: boolean;
1457
+ /** The exposure meter measured within tolerance of the target it owns. */
1458
+ readonly exposureSettled: boolean;
1459
+ /** Every active virtual shadow mapped its clip levels, and an ordinary world frame drew. */
1460
+ readonly shadowInputsReady: boolean;
1461
+ }
1462
+
1316
1463
  /** The standard buffer fields this renderer seam verifies; the device handle stays opaque. */
1317
1464
  interface IRendererStorageBuffer {
1318
1465
  readonly size: number;
@@ -1390,8 +1537,24 @@ interface IRendererLike {
1390
1537
  warmUpSettled?(): void;
1391
1538
  /** Marks a repeatable streamed warm-up boundary for the next first draw. */
1392
1539
  warmUpScopeSettled?(label: string, target?: Object3D): void;
1393
- /** Performs one covered output-pipeline render without marking first present. */
1394
- warmUpWorldPass?(scene: Object3D, camera: Camera, targetScene?: Object3D): void;
1540
+ /**
1541
+ * Holds the native canvas at its last picture while the startup's first world frame is still cold: every frame
1542
+ * still draws, but takes no surface texture, so a world whose shadow and exposure inputs are not ready never
1543
+ * reaches the display. Present only on the Wasm engine; a renderer without it draws and presents as before.
1544
+ */
1545
+ setPresentationHeld?(held: boolean): void;
1546
+ /**
1547
+ * A held startup's first world frame: `ready` once an ordinary submission drew since the hold engaged, that
1548
+ * frame's shadow inputs are initialized, and this install's auto exposure measured within 3% of its target; the
1549
+ * two inputs say which one is still cold, so a launch that revealed at its deadline names what never arrived.
1550
+ * Absent wherever the hold is.
1551
+ */
1552
+ firstWorldFrame?(): IStartupImageState;
1553
+ /**
1554
+ * Performs one covered output-pipeline render without marking first present. `afterDraw` runs in
1555
+ * the same task as every draw it makes, the frame gate's retries included, to repaint a cover.
1556
+ */
1557
+ warmUpWorldPass?(scene: Object3D, camera: Camera, targetScene?: Object3D, afterDraw?: () => void): void | Promise<void>;
1395
1558
  /**
1396
1559
  * What alpha antialiasing did with the multisampled surface, and why, when it did nothing.
1397
1560
  *
@@ -1594,6 +1757,9 @@ interface IRendererLike {
1594
1757
  * caller; a pinned game never reaches this, which is what makes "pinned" mean pinned.
1595
1758
  */
1596
1759
  setResolutionScale(scale: number, scaleSource: "auto" | "auto-pinned"): void;
1760
+ /** True only while the owned temporal resolve reconstructs display pixels. */
1761
+ temporalUpscale?(): boolean;
1762
+ temporalUpscaleStartScale?(): number | undefined;
1597
1763
  /**
1598
1764
  * What this renderer is actually drawing at. Read once per frame-budget window so every fps
1599
1765
  * number is self-describing; a record and a tree once disagreed about the scale for a whole
@@ -1623,6 +1789,13 @@ interface IRendererOptions {
1623
1789
  alphaAntialiasing?: boolean;
1624
1790
  /** Requests multisample antialiasing from the renderer. Defaults to true. */
1625
1791
  antialias?: boolean;
1792
+ /**
1793
+ * The tone curve a WebGPU renderer starts with. Defaults to `filmic`, a fresh Unreal 5.8.3
1794
+ * project's curve; `aces`, `agx`, `neutral` and `none` (three's linear output) are the named
1795
+ * overrides. A renderer that cannot run the curve keeps ACES and reports `TN_TONEMAP`. Setting
1796
+ * `renderer.raw.toneMapping` afterwards still wins.
1797
+ */
1798
+ toneMapping?: RendererToneMapping;
1626
1799
  canvas?: HTMLCanvasElement;
1627
1800
  gpuTimestampFrameInterval?: number;
1628
1801
  preferWebGPU?: boolean;
@@ -1656,4 +1829,4 @@ interface IRendererOptions {
1656
1829
  }>) => unknown;
1657
1830
  }
1658
1831
 
1659
- export { RENDER_CHAIN_TIERS as $, type IRenderChainDroppedStage as A, type IRenderChainOptions as B, type IRenderChainRenderer as C, DEFAULT_PIPELINE_CENSUS_LIMIT as D, type IRenderChainRequest as E, type FramePassKind as F, type IRenderChainStage as G, type IRenderChainStageContext as H, type IRendererLike as I, type IRenderChainVelocityMeasurement as J, type IRenderChainVelocityReport as K, type IRenderChainVelocityRequest as L, type IRenderChainVelocityResult as M, type ITargetFps as N, type IVelocityRenderPass as O, MAX_TARGET_FPS as P, type MainDrawSource as Q, PIPELINE_CENSUS_CAPABILITY as R, PIPELINE_CENSUS_VERSION as S, PipelineCensus as T, type PipelineCensusMode as U, type PipelineCensusStatus as V, type PlatformFormFactor as W, type PlatformOS as X, type PlatformRuntime as Y, RENDER_CHAIN_MARKER as Z, RENDER_CHAIN_STAGE_ORDER as _, type IFrameBudgetWindow as a, RenderChain as a0, type RenderChainSource as a1, type RenderChainStageId as a2, type RenderChainStageName as a3, type RenderChainTier as a4, type RenderChainTierRequest as a5, type RenderChainVelocitySource as a6, type TargetFpsSource as a7, VELOCITY_OUTPUT_NAME as a8, VELOCITY_PREVIOUS_BONE_MATRICES as a9, VELOCITY_PREVIOUS_INSTANCE_MATRICES as aa, VELOCITY_PREVIOUS_WORLD_MATRIX as ab, VelocityTracker as ac, counterDeviceOf as ad, createPipelineCensus as ae, ensureVelocityOutput as af, getPlatform as ag, isMobile as ah, isNative as ai, isTouchscreenAvailable as aj, isWeb as ak, prewarm as al, readRenderChainObservation as am, readRenderChainReport as an, readVelocityPreviousBoneMatrices as ao, readVelocityPreviousMatrices as ap, readVelocityPreviousWorldMatrix as aq, resolveTargetFps as ar, snapRefreshRate as as, velocityTexture as at, withVelocityContext as au, type IFrameBudgetSimulation as b, type IRenderPassSample as c, type IFramePhaseSample as d, type IPipelineCensus as e, type IRendererOptions as f, type IFrameBudgetOptions as g, DEFAULT_TARGET_FPS as h, FRAME_BUDGET_MARKER as i, FRAME_BUDGET_PHASES as j, FRAME_HITCH_MARKER as k, FrameBudget as l, type FrameBudgetPhase as m, FrameCounters as n, type ICounterDevice as o, type IFrameBudgetPassSummary as p, type IFrameBudgetSummary as q, type IFrameCounters as r, type IPipelineCensusCounts as s, type IPipelineCensusEvent as t, type IPipelineCensusOptions as u, type IPipelineProvenance as v, type IPipelineShaderObservation as w, type IPlatformInfo as x, type IRenderChainApplied as y, type IRenderChainBudgetWindow as z };
1832
+ export { RENDER_CHAIN_STAGE_ORDER as $, type IRenderChainBudgetWindow as A, type IRenderChainDroppedStage as B, type IRenderChainOptions as C, DEFAULT_PIPELINE_CENSUS_LIMIT as D, type IRenderChainRenderer as E, type FramePassKind as F, type IRenderChainRequest as G, type IRenderChainStage as H, type IRendererLike as I, type IRenderChainStageContext as J, type IRenderChainVelocityMeasurement as K, type IRenderChainVelocityReport as L, type IRenderChainVelocityRequest as M, type IRenderChainVelocityResult as N, type ITargetFps as O, type IVelocityRenderPass as P, MAX_TARGET_FPS as Q, type MainDrawSource as R, PIPELINE_CENSUS_CAPABILITY as S, PIPELINE_CENSUS_VERSION as T, PipelineCensus as U, type PipelineCensusMode as V, type PipelineCensusStatus as W, type PlatformFormFactor as X, type PlatformOS as Y, type PlatformRuntime as Z, RENDER_CHAIN_MARKER as _, type IFrameBudgetWindow as a, RENDER_CHAIN_TIERS as a0, RenderChain as a1, type RenderChainSource as a2, type RenderChainStageId as a3, type RenderChainStageName as a4, type RenderChainTier as a5, type RenderChainTierRequest as a6, type RenderChainVelocitySource as a7, type RendererToneMapping as a8, type TargetFpsSource as a9, VELOCITY_OUTPUT_NAME as aa, VELOCITY_PREVIOUS_BONE_MATRICES as ab, VELOCITY_PREVIOUS_INSTANCE_MATRICES as ac, VELOCITY_PREVIOUS_WORLD_MATRIX as ad, VelocityTracker as ae, counterDeviceOf as af, createPipelineCensus as ag, ensureVelocityOutput as ah, getPlatform as ai, isMobile as aj, isNative as ak, isTouchscreenAvailable as al, isWeb as am, prewarm as an, readRenderChainObservation as ao, readRenderChainReport as ap, readVelocityPreviousBoneMatrices as aq, readVelocityPreviousMatrices as ar, readVelocityPreviousWorldMatrix as as, resolveTargetFps as at, snapRefreshRate as au, stageGpuReading as av, velocityTexture as aw, withVelocityContext as ax, type IFrameBudgetSimulation as b, type IRenderPassSample as c, type IFramePhaseSample as d, type IPipelineCensus as e, type IRendererOptions as f, type IFrameBudgetOptions as g, type IStageGpuReading as h, DEFAULT_TARGET_FPS as i, FRAME_BUDGET_MARKER as j, FRAME_BUDGET_PHASES as k, FRAME_HITCH_MARKER as l, FrameBudget as m, type FrameBudgetPhase as n, FrameCounters as o, type ICounterDevice as p, type IFrameBudgetPassSummary as q, type IFrameBudgetSummary as r, type IFrameCounters as s, type IPipelineCensusCounts as t, type IPipelineCensusEvent as u, type IPipelineCensusOptions as v, type IPipelineProvenance as w, type IPipelineShaderObservation as x, type IPlatformInfo as y, type IRenderChainApplied as z };