Graphics pass: calm space backdrop, refined BH/stars, label solver
This commit is contained in:
21
web/scripts/capture-galaxy.mjs
Normal file
21
web/scripts/capture-galaxy.mjs
Normal file
@@ -0,0 +1,21 @@
|
||||
import { chromium } from "playwright";
|
||||
|
||||
const base = process.env.TESSERA_URL ?? "http://127.0.0.1:8787/";
|
||||
const outFlow =
|
||||
process.env.FLOW_SHOT ?? "/cursor/stores/self/media/tessera-galaxy-flow-polish.png";
|
||||
const outLock =
|
||||
process.env.LOCK_SHOT ?? "/cursor/stores/self/media/tessera-galaxy-locked-polish.png";
|
||||
|
||||
const browser = await chromium.launch({ headless: true });
|
||||
const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
|
||||
await page.goto(base, { waitUntil: "networkidle", timeout: 30_000 });
|
||||
await page.waitForTimeout(2500);
|
||||
await page.screenshot({ path: outFlow, fullPage: false });
|
||||
const svg = page.locator('[aria-label="Galaxy vault viewport"]');
|
||||
const box = await svg.boundingBox();
|
||||
if (!box) throw new Error("galaxy svg not found");
|
||||
await page.mouse.click(box.x + box.width / 2, box.y + box.height / 2);
|
||||
await page.waitForTimeout(1400);
|
||||
await page.screenshot({ path: outLock, fullPage: false });
|
||||
await browser.close();
|
||||
console.log("saved", outFlow, outLock);
|
||||
Reference in New Issue
Block a user