@moku-labs/game 0.15.126 → 0.15.127

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 (2) hide show
  1. package/dist/visual.mjs +2 -20
  2. package/package.json +1 -1
package/dist/visual.mjs CHANGED
@@ -1522,31 +1522,13 @@ const pageFunctions = [
1522
1522
  function pageScript() {
1523
1523
  return `(() => {\n${pageFunctions.flatMap((fn) => [String(fn), `globalThis[${JSON.stringify(fn.name)}] = ${fn.name};`]).join("\n")}\n})();\n`;
1524
1524
  }
1525
- //#endregion
1526
- //#region src/visual/leg-browser.ts
1527
- /**
1528
- * @file visual — the browser leg: Chrome with WebGPU on a Mac, driven by Playwright. It loads
1529
- * `playwright-core` with a dynamic import only here, opens the dev page once per test, waits until
1530
- * the page has loaded what it asked for, turns on the renderer's check of skipped frames
1531
- * (`debug.verifyFrames`), pauses the game and steps it to the start time, plays the
1532
- * test inside the page through `globalThis.game` and `globalThis.doors` on stepped frames, and at
1533
- * each checkpoint checks the page's state against `state.json` and its picture against
1534
- * `screen.webp`. The WebGL leg opens the page with `?renderer=webgl` and keeps its pictures in
1535
- * `screen.webgl.webp`. The pixels are compared in the page (`page-script.ts`); the files are written by
1536
- * `files.ts`. A failure of the page itself fails the leg; a failure of a step ends its test only.
1537
- */
1538
- /**
1539
- * The Chrome flags of every launch: WebGPU on Metal, on any GPU, and no macOS keychain (F186): a
1540
- * Chrome without the two last flags asks the keychain for "Chrome Safe Storage" and opens a
1541
- * dialog over the screen on every pixel run.
1542
- */
1525
+ /** The Chrome flags of every launch of the leg: WebGPU on Metal, on any GPU, and no macOS keychain. */
1543
1526
  const CHROME_FLAGS = [
1544
1527
  "--enable-unsafe-webgpu",
1545
1528
  "--use-angle=metal",
1546
1529
  "--enable-gpu",
1547
1530
  "--ignore-gpu-blocklist",
1548
- "--use-mock-keychain",
1549
- "--password-store=basic"
1531
+ ...["--use-mock-keychain", "--password-store=basic"]
1550
1532
  ];
1551
1533
  /** The page width in CSS px when the setup names none: a phone. */
1552
1534
  const DEFAULT_WIDTH = 390;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moku-labs/game",
3
- "version": "0.15.126",
3
+ "version": "0.15.127",
4
4
  "description": "2D puzzle game engine on TypeScript and PixiJS, built on @moku-labs/core.",
5
5
  "type": "module",
6
6
  "sideEffects": [