@threenative/playtest 0.3.5 → 0.3.8

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.
@@ -88,6 +88,26 @@ interface IPlaytestStartupTimeline {
88
88
  compileSettledMs?: number;
89
89
  readyMs?: number;
90
90
  }
91
+ /**
92
+ * What the reveal waited for through the asset loader, split by whether the spawn camera shows it.
93
+ * Measured by the application at the reveal; mirrors core's `IStartupOffscreenBytes`.
94
+ */
95
+ interface IPlaytestStartupOffscreenBytes {
96
+ awaitedBytes: number;
97
+ fix: string;
98
+ offscreenBytes: number;
99
+ top: {
100
+ bytes: number;
101
+ path: string;
102
+ reason: "hidden" | "not-placed" | "outside-view";
103
+ }[];
104
+ unattributedBytes: number;
105
+ /** Awaited files with no manifest size, in no byte count. */
106
+ unsizedFiles: number;
107
+ visibleBytes: number;
108
+ /** Off-screen bytes exceed visible bytes: most of the wait bought nothing on screen. */
109
+ warn: boolean;
110
+ }
91
111
  interface IPlaytestStartupObservation {
92
112
  phase: "observing" | "collapsing" | "ready";
93
113
  /** 0 while first-use work is pending, then 1. */
@@ -113,8 +133,41 @@ interface IPlaytestStartupObservation {
113
133
  * the machine has no GPU has already conceded it is not measuring that.
114
134
  */
115
135
  compileSettled?: boolean;
136
+ /**
137
+ * Whether the loading cover has lifted, which happens after `phase` reaches `"ready"`: the
138
+ * game holds its UI state until the first uncovered frame has left the GPU. Absent from a
139
+ * game that does not report it, which the runner reads as uncovered.
140
+ */
141
+ revealed?: boolean;
116
142
  /** Present when the application records its startup milestones. */
117
143
  timeline?: IPlaytestStartupTimeline;
144
+ /** Present once the reveal ran and the application measured what it waited for. */
145
+ offscreenBytes?: IPlaytestStartupOffscreenBytes;
146
+ /** The frames the page presented before readiness; recorded by the browser runner on request. */
147
+ cover?: IPlaytestStartupCoverObservation;
148
+ }
149
+ /**
150
+ * The compositor frames from navigation to readiness, each compared with the last one before
151
+ * readiness. A frame differs when more than a quarter of its pixels moved past the tolerance.
152
+ */
153
+ interface IPlaytestStartupCoverObservation {
154
+ /** Frames recorded between navigation and readiness. */
155
+ frames: number;
156
+ /** Mean colour of the reference frame, the last before readiness, 0-255. */
157
+ reference: [number, number, number];
158
+ /** Every differing frame: ms since navigation, its mean colour and its differing pixel share. */
159
+ differing: Array<{
160
+ ms: number;
161
+ mean: [number, number, number];
162
+ share: number;
163
+ }>;
164
+ /** The first frame after readiness that differs from the cover, ms since navigation; absent when none was recorded. */
165
+ worldMs?: number;
166
+ /** Frames between readiness and `worldMs` that show the world's page UI (a HUD) over the cover. */
167
+ uiOverCover: Array<{
168
+ ms: number;
169
+ share: number;
170
+ }>;
118
171
  }
119
172
  /**
120
173
  * How long a run will wait for an application to finish its own first-use startup work.
@@ -176,6 +229,18 @@ interface IPlaytestSampleRequest {
176
229
  resources?: readonly string[];
177
230
  /** Scene-graph selectors to report, one observation per selector, in request order. */
178
231
  sceneNodes?: readonly IPlaytestSceneNodeSelector[];
232
+ /** Report what stands between the camera and this entity's world bounds centre. */
233
+ sightLine?: {
234
+ entity: string;
235
+ };
236
+ }
237
+ /** What the lens sees of the subject: whether any solid blocks it, and which solids do. */
238
+ interface IPlaytestSightLineObservation {
239
+ blocked: boolean;
240
+ /** Distinct names of the nearest blocking meshes, nearest first, at most five. */
241
+ blockers: string[];
242
+ /** Metres from the camera's world position to the subject's world bounds centre. */
243
+ distance: number;
179
244
  }
180
245
  interface IPlaytestEntityObservation {
181
246
  bounds?: {
@@ -201,6 +266,11 @@ interface IPlaytestStrideObservation {
201
266
  clipGroundSpeed: number;
202
267
  /** Metres per second the body actually covered, as the producer smoothed it. */
203
268
  groundSpeed: number;
269
+ /**
270
+ * True when the clip carries no root motion and its stride came from the feet. With a zero
271
+ * `clipGroundSpeed` it says no foot plant was found, which is why stride sync is not active.
272
+ */
273
+ inPlace?: boolean;
204
274
  /** True when a rate was measured and deliberately not applied. */
205
275
  overridden: boolean;
206
276
  /** The playback rate those two imply, after the producer's own clamping. */
@@ -539,6 +609,8 @@ interface IPlaytestObservationSnapshot {
539
609
  resources?: Record<string, JsonValue>;
540
610
  scene?: IPlaytestSceneObservation;
541
611
  sceneNodes?: IPlaytestSceneNodesObservation[];
612
+ /** Present when the request named an entity to sight from the camera. */
613
+ sightLine?: IPlaytestSightLineObservation;
542
614
  }
543
615
  /**
544
616
  * What the bridge says it actually applied, as opposed to what the runner asked for.
@@ -608,4 +680,4 @@ declare function jsonByteLength(value: JsonValue): number;
608
680
  */
609
681
  declare function assertJsonSafe(value: unknown, path?: string): asserts value is JsonValue;
610
682
 
611
- 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_CLOCK_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, requestedPlaytestClockMode };
683
+ 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 IPlaytestSightLineObservation, type IPlaytestStartupCoverObservation, type IPlaytestStartupObservation, type IPlaytestStartupOffscreenBytes, 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_CLOCK_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, requestedPlaytestClockMode };
@@ -1,8 +1,8 @@
1
- import { I as IStandalonePlaytestConfig, a as IStandalonePlaytestReport } from '../shared-DK12BZyS.js';
2
- import '../schema-base-B5mr_Yr9.js';
1
+ import { I as IStandalonePlaytestConfig, a as IStandalonePlaytestReport } from '../shared-Dg-3kiU8.js';
2
+ import '../schema-base-B26KSBoa.js';
3
3
  import '../protocol.js';
4
4
  import 'playwright';
5
- import '../diagnostics-BhS6v2n1.js';
5
+ import '../diagnostics-BKg7C6Lf.js';
6
6
 
7
7
  interface IRunnerDiagnostic {
8
8
  code: string;