Back to Pursuit PIT
SOURCE / PINNED RELEASE

Made of little things.

Pursuit PIT

Release
565f4981bdc3…
Author-recorded commit
197afdbed44b…
License
LICENSE
Author’s source reference
nostr://npub12lm3rxsva8kfempyjkxupt09e02n3fezurkyadyqfejdc5e0r2kscqty6r/wss%3A%2F%2Fgit.napplet.soy%2F/n-951414e7fd7

Archive hash verified: 3b0485589942fd5c…. The source-to-build association is the author’s claim; it has not been independently rebuilt.

tools/shots.mjs
// Screenshot the built napplet at several frame sizes: node tools/shots.mjs
import { chromium } from '../node_modules/.pnpm/playwright@1.61.0/node_modules/playwright/index.mjs';
import { mkdirSync } from 'node:fs';
import { pathToFileURL } from 'node:url';
import { resolve } from 'node:path';

const url = pathToFileURL(resolve('dist/index.html')).href;
mkdirSync('tools/shots', { recursive: true });
const browser = await chromium.launch({ args: ['--use-gl=angle', '--use-angle=swiftshader', '--enable-unsafe-swiftshader'] });
const sizes = [[900, 600], [320, 560], [200, 160], [1280, 720]];
for (const [w, h] of sizes) {
  const page = await browser.newPage({ viewport: { width: w, height: h } });
  const errors = [];
  page.on('pageerror', (e) => errors.push(e.message));
  page.on('console', (m) => m.type() === 'error' && errors.push(m.text()));
  await page.goto(url);
  await page.waitForTimeout(1200);
  await page.screenshot({ path: `tools/shots/menu-${w}x${h}.png` });
  await page.keyboard.press('Enter'); // pursuit: opens the time-of-day picker
  await page.keyboard.press('Enter'); // the highlighted time (day the first time round)
  await page.keyboard.down('KeyW');
  await page.waitForTimeout(4000);
  await page.keyboard.down('KeyD');
  await page.waitForTimeout(400);
  await page.keyboard.up('KeyD');
  await page.waitForTimeout(800);
  await page.screenshot({ path: `tools/shots/drive-${w}x${h}.png` });
  console.log(`${w}x${h}`, errors.length ? errors : 'no errors');
  await page.close();
}
await browser.close();