@threenative/playtest 0.3.2 → 0.3.4
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/capture.d.ts +7 -0
- package/dist/{diagnostics-f8464bJw.d.ts → diagnostics-BXhYI2sc.d.ts} +431 -6
- package/dist/index.d.ts +4 -4
- package/dist/index.js +459 -90
- package/dist/protocol.d.ts +39 -1
- package/dist/protocol.js +2 -1
- package/dist/runner/cli.d.ts +2 -2
- package/dist/runner/cli.js +2016 -591
- package/dist/runner/index.d.ts +86 -242
- package/dist/runner/index.js +2891 -1701
- package/dist/{shared-BGwYk5HG.d.ts → shared-CHIDDJpp.d.ts} +46 -5
- package/dist/three/index.d.ts +10 -1
- package/dist/three/index.js +15 -7
- package/package.json +1 -1
package/dist/protocol.d.ts
CHANGED
|
@@ -132,8 +132,19 @@ interface IPlaytestSetupRequest {
|
|
|
132
132
|
value: JsonValue;
|
|
133
133
|
}>;
|
|
134
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* One armed per-object geometry capture request. `limit`, `sort` and `timeoutMs` mirror the
|
|
137
|
+
* runtime collector's own request shape so the runner adds no second vocabulary for it.
|
|
138
|
+
*/
|
|
139
|
+
interface IPlaytestGeometryCaptureRequest {
|
|
140
|
+
/** Rows to return, 1 to 500. */
|
|
141
|
+
readonly limit?: number;
|
|
142
|
+
readonly sort?: "triangles" | "draws" | "projected";
|
|
143
|
+
readonly timeoutMs?: number;
|
|
144
|
+
}
|
|
135
145
|
interface IPlaytestSampleRequest {
|
|
136
146
|
entities?: readonly string[];
|
|
147
|
+
geometry?: IPlaytestGeometryCaptureRequest;
|
|
137
148
|
include?: readonly string[];
|
|
138
149
|
/** Scenario-step label for providers that retain labelled observation series. */
|
|
139
150
|
label?: string;
|
|
@@ -436,6 +447,19 @@ type PlaytestFramePhase = (typeof PLAYTEST_FRAME_BUDGET_PHASES)[number];
|
|
|
436
447
|
* missing evidence rather than passing on nothing.
|
|
437
448
|
*/
|
|
438
449
|
type PlaytestFramePhaseSample = Partial<Record<PlaytestFramePhase, number>>;
|
|
450
|
+
/**
|
|
451
|
+
* The named render-pass kinds a budget can bound. Deliberately the same closed set the engine's
|
|
452
|
+
* `RenderPassBudget` emits, spelled out here rather than imported: this package must run against
|
|
453
|
+
* plain Three.js with zero ThreeNative dependency, exactly as it does for the phase names.
|
|
454
|
+
*/
|
|
455
|
+
declare const PLAYTEST_FRAME_PASS_KINDS: readonly ["main", "shadow", "reflection", "nested"];
|
|
456
|
+
type PlaytestFramePassKind = (typeof PLAYTEST_FRAME_PASS_KINDS)[number];
|
|
457
|
+
/** One render pass's own submissions, attributed to the innermost active render call. */
|
|
458
|
+
interface IPlaytestFramePassSample {
|
|
459
|
+
readonly draws: number;
|
|
460
|
+
readonly kind: PlaytestFramePassKind;
|
|
461
|
+
readonly triangles: number;
|
|
462
|
+
}
|
|
439
463
|
interface IPlaytestRuntimeDiagnosticsSample {
|
|
440
464
|
drawCalls?: number;
|
|
441
465
|
frameMs: number;
|
|
@@ -444,6 +468,11 @@ interface IPlaytestRuntimeDiagnosticsSample {
|
|
|
444
468
|
* frame budget. Absent for a plain Three.js bridge.
|
|
445
469
|
*/
|
|
446
470
|
phases?: PlaytestFramePhaseSample;
|
|
471
|
+
/**
|
|
472
|
+
* Draw calls and triangles per render pass, so a shadow or reflection pass is bounded rather
|
|
473
|
+
* than folded into the whole-frame draw count. Absent when the producer measures no split.
|
|
474
|
+
*/
|
|
475
|
+
passes?: readonly IPlaytestFramePassSample[];
|
|
447
476
|
triangles?: number;
|
|
448
477
|
}
|
|
449
478
|
interface IPlaytestObservationSnapshot {
|
|
@@ -456,11 +485,20 @@ interface IPlaytestObservationSnapshot {
|
|
|
456
485
|
components?: Record<string, Record<string, JsonValue>>;
|
|
457
486
|
entities?: IPlaytestEntityObservation[];
|
|
458
487
|
gameplay?: IPlaytestGameplayObservation;
|
|
488
|
+
/** The per-object geometry capture report, present only when the request asked for one. */
|
|
489
|
+
geometry?: JsonValue;
|
|
459
490
|
physicsDebugSeries?: Array<{
|
|
460
491
|
label: string;
|
|
461
492
|
snapshot: JsonValue;
|
|
462
493
|
tick: number;
|
|
463
494
|
}>;
|
|
495
|
+
/**
|
|
496
|
+
* Steps the physics simulation completed, counted by the plugin that owns it at its own
|
|
497
|
+
* `simulation.step`. Not the game loop's tick: a frame can render with no step, and a step can be
|
|
498
|
+
* refused. Only present when a physics plugin installed, which is what advertises
|
|
499
|
+
* `runtime.physics`.
|
|
500
|
+
*/
|
|
501
|
+
physicsSteps?: number;
|
|
464
502
|
performance?: IPlaytestPerformanceObservation;
|
|
465
503
|
/** Bounded shader/pipeline creation capture supplied by the engine when diagnostics are enabled. */
|
|
466
504
|
pipelineCensus?: JsonValue;
|
|
@@ -529,4 +567,4 @@ declare function jsonByteLength(value: JsonValue): number;
|
|
|
529
567
|
*/
|
|
530
568
|
declare function assertJsonSafe(value: unknown, path?: string): asserts value is JsonValue;
|
|
531
569
|
|
|
532
|
-
export { type IPlaytestAdvanceResult, type IPlaytestAnimationObservation, type IPlaytestBridgeDescription, type IPlaytestBridgeHost, type IPlaytestBridgeReady, type IPlaytestBridgeV1, type IPlaytestCameraObservation, type IPlaytestContactObservation, type IPlaytestDeviceRequest, type IPlaytestDeviceResponse, type IPlaytestEntityObservation, type IPlaytestEntityTransform, type IPlaytestFogObservation, type IPlaytestGameplayObservation, type IPlaytestLightObservation, type IPlaytestObservationSnapshot, type IPlaytestPerformanceObservation, type IPlaytestRenderChainObservation, type IPlaytestRuntimeDiagnosticsSample, type IPlaytestSampleRequest, type IPlaytestSceneNodeMaterial, type IPlaytestSceneNodeObservation, type IPlaytestSceneNodeSelector, type IPlaytestSceneNodesObservation, type IPlaytestSceneObservation, type IPlaytestSetupConfirmation, type IPlaytestSetupRequest, type IPlaytestStartupObservation, type IPlaytestStartupTimeline, type IPlaytestStrideObservation, type IPlaytestTagObservation, type IPlaytestTransitionObservation, type IPlaytestWorldObservation, type IPlaytestWorldRuntimeObservation, type JsonPrimitive, type JsonValue, PLAYTEST_ADVANCE_TICK_BUDGET_MS, PLAYTEST_BRIDGE_GLOBAL, PLAYTEST_FRAME_BUDGET_PHASES, PLAYTEST_FROZEN_MARKER, PLAYTEST_PROTOCOL_LIMITS, PLAYTEST_PROTOCOL_VERSION, PLAYTEST_STARTUP_COMPILE_BUDGET_MS, PLAYTEST_STARTUP_READY_TIMEOUT_MS, type PlaytestClockMode, type PlaytestFramePhase, type PlaytestFramePhaseSample, assertJsonSafe, jsonByteLength };
|
|
570
|
+
export { type IPlaytestAdvanceResult, type IPlaytestAnimationObservation, type IPlaytestBridgeDescription, type IPlaytestBridgeHost, type IPlaytestBridgeReady, type IPlaytestBridgeV1, type IPlaytestCameraObservation, type IPlaytestContactObservation, type IPlaytestDeviceRequest, type IPlaytestDeviceResponse, type IPlaytestEntityObservation, type IPlaytestEntityTransform, type IPlaytestFogObservation, type IPlaytestFramePassSample, type IPlaytestGameplayObservation, type IPlaytestGeometryCaptureRequest, type IPlaytestLightObservation, type IPlaytestObservationSnapshot, type IPlaytestPerformanceObservation, type IPlaytestRenderChainObservation, type IPlaytestRuntimeDiagnosticsSample, type IPlaytestSampleRequest, type IPlaytestSceneNodeMaterial, type IPlaytestSceneNodeObservation, type IPlaytestSceneNodeSelector, type IPlaytestSceneNodesObservation, type IPlaytestSceneObservation, type IPlaytestSetupConfirmation, type IPlaytestSetupRequest, type IPlaytestStartupObservation, type IPlaytestStartupTimeline, type IPlaytestStrideObservation, type IPlaytestTagObservation, type IPlaytestTransitionObservation, type IPlaytestWorldObservation, type IPlaytestWorldRuntimeObservation, type JsonPrimitive, type JsonValue, PLAYTEST_ADVANCE_TICK_BUDGET_MS, PLAYTEST_BRIDGE_GLOBAL, PLAYTEST_FRAME_BUDGET_PHASES, PLAYTEST_FRAME_PASS_KINDS, PLAYTEST_FROZEN_MARKER, PLAYTEST_PROTOCOL_LIMITS, PLAYTEST_PROTOCOL_VERSION, PLAYTEST_STARTUP_COMPILE_BUDGET_MS, PLAYTEST_STARTUP_READY_TIMEOUT_MS, type PlaytestClockMode, type PlaytestFramePassKind, type PlaytestFramePhase, type PlaytestFramePhaseSample, assertJsonSafe, jsonByteLength };
|
package/dist/protocol.js
CHANGED
|
@@ -13,6 +13,7 @@ var PLAYTEST_PROTOCOL_LIMITS = {
|
|
|
13
13
|
};
|
|
14
14
|
var PLAYTEST_STARTUP_READY_TIMEOUT_MS = 18e4;
|
|
15
15
|
var PLAYTEST_FRAME_BUDGET_PHASES = ["hostGap", "overlay", "render", "residual", "update"];
|
|
16
|
+
var PLAYTEST_FRAME_PASS_KINDS = ["main", "shadow", "reflection", "nested"];
|
|
16
17
|
function jsonByteLength(value) {
|
|
17
18
|
return new TextEncoder().encode(JSON.stringify(value)).byteLength;
|
|
18
19
|
}
|
|
@@ -39,4 +40,4 @@ function assertJsonSafe(value, path = "$") {
|
|
|
39
40
|
throw new TypeError(`${path} must be JSON-safe.`);
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
export { PLAYTEST_ADVANCE_TICK_BUDGET_MS, PLAYTEST_BRIDGE_GLOBAL, PLAYTEST_FRAME_BUDGET_PHASES, PLAYTEST_FROZEN_MARKER, PLAYTEST_PROTOCOL_LIMITS, PLAYTEST_PROTOCOL_VERSION, PLAYTEST_STARTUP_COMPILE_BUDGET_MS, PLAYTEST_STARTUP_READY_TIMEOUT_MS, assertJsonSafe, jsonByteLength };
|
|
43
|
+
export { PLAYTEST_ADVANCE_TICK_BUDGET_MS, PLAYTEST_BRIDGE_GLOBAL, PLAYTEST_FRAME_BUDGET_PHASES, PLAYTEST_FRAME_PASS_KINDS, PLAYTEST_FROZEN_MARKER, PLAYTEST_PROTOCOL_LIMITS, PLAYTEST_PROTOCOL_VERSION, PLAYTEST_STARTUP_COMPILE_BUDGET_MS, PLAYTEST_STARTUP_READY_TIMEOUT_MS, assertJsonSafe, jsonByteLength };
|
package/dist/runner/cli.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { I as IStandalonePlaytestConfig, a as IStandalonePlaytestReport } from '../shared-
|
|
1
|
+
import { I as IStandalonePlaytestConfig, a as IStandalonePlaytestReport } from '../shared-CHIDDJpp.js';
|
|
2
|
+
import '../diagnostics-BXhYI2sc.js';
|
|
2
3
|
import '../protocol.js';
|
|
3
|
-
import '../diagnostics-f8464bJw.js';
|
|
4
4
|
|
|
5
5
|
interface IRunnerDiagnostic {
|
|
6
6
|
code: string;
|