@threenative/playtest 0.3.2 → 0.3.3

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.
@@ -1,5 +1,5 @@
1
1
  import { IPlaytestObservationSnapshot } from './protocol.js';
2
- import { c as IPlaytestReport, w as IPlaytestProtocolDiagnostic, p as IPlaytestDiagnosticsPolicy, d as IPlaytestAssertionResult } from './diagnostics-f8464bJw.js';
2
+ import { c as IPlaytestReport, w as IPlaytestProtocolDiagnostic, p as IPlaytestDiagnosticsPolicy, d as IPlaytestAssertionResult } from './diagnostics-Bpy15z5f.js';
3
3
 
4
4
  interface IPlaytestServerConfig {
5
5
  command: string;
@@ -31,6 +31,8 @@ interface IStandalonePlaytestConfig {
31
31
  */
32
32
  captureArtifactScreenshots?: boolean;
33
33
  browserArgs?: readonly string[];
34
+ /** Write a Chrome DevTools `.cpuprofile` for this run (browser and desktop targets). */
35
+ cpuProfilePath?: string;
34
36
  device?: string;
35
37
  desktop?: {
36
38
  executable: string;
@@ -115,6 +117,11 @@ declare const PLAYTEST_FLAGS: {
115
117
  readonly summary: "named browser recipe (webgpu)";
116
118
  readonly takesValue: true;
117
119
  };
120
+ readonly "--cpu-prof": {
121
+ readonly default: "none";
122
+ readonly summary: "write a Chrome DevTools .cpuprofile for this run (browser and desktop targets)";
123
+ readonly takesValue: true;
124
+ };
118
125
  readonly "--bundle-id": {
119
126
  readonly default: "dev.threenative.runtime";
120
127
  readonly summary: "iOS application bundle identifier";
@@ -141,6 +148,7 @@ declare const PLAYTEST_FLAGS: {
141
148
  readonly takesValue: false;
142
149
  };
143
150
  readonly "--host-arg": {
151
+ readonly allowDashValue: true;
144
152
  readonly default: "none";
145
153
  readonly repeatable: true;
146
154
  readonly summary: "argument passed to the native desktop host, repeatable";
@@ -831,7 +831,10 @@ function sampleThreeObservations(input, request) {
831
831
  ...input.gameplay === void 0 ? {} : { gameplay: input.gameplay() },
832
832
  ...renderPerformance === void 0 ? {} : { performance: renderPerformance },
833
833
  ...renderChain === void 0 ? {} : { renderChain },
834
- ...input.runtimeDiagnosticsSeries === void 0 ? {} : { runtimeDiagnosticsSeries: input.runtimeDiagnosticsSeries().map((sample) => ({ ...sample })) },
834
+ // The series is a window of up to a thousand samples, so an unconditional copy made every
835
+ // device sample payload grow past the protocol's byte ceiling once a paced run actually
836
+ // rendered that many frames. Answer it only when the request asks, like every other field.
837
+ ...input.runtimeDiagnosticsSeries === void 0 || request.include?.includes("runtimeDiagnosticsSeries") !== true ? {} : { runtimeDiagnosticsSeries: input.runtimeDiagnosticsSeries().map((sample) => ({ ...sample })) },
835
838
  ...input.resources === void 0 ? {} : { resources: input.resources() },
836
839
  scene: observeSceneResources(input.scene, input.camera),
837
840
  // Only walked when a scenario asks. The node walk reads geometry, materials and world
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threenative/playtest",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "license": "MIT",
5
5
  "description": "Scenario-driven playtest harness for Three.js games. Runs on plain Three.js with zero ThreeNative dependencies.",
6
6
  "keywords": [