Add main menu, 3v3 with goalies, and dead-puck faceoffs.

Players pick 1-on-1 shootout or 3-on-3 scrimmage; 3v3 gets nets,
goalies, scoring, OOB whistles to the nearest faceoff circle, and
one-way board re-entry for skaters who leave the ice.
This commit is contained in:
ryanfitzpatrickio
2026-08-03 10:28:11 -05:00
parent 94d24205dc
commit dd819e991d
8 changed files with 1371 additions and 116 deletions
+6 -1
View File
@@ -83,10 +83,15 @@ try {
});
page.on('pageerror', (err) => errors.push(String(err?.stack ?? err)));
await page.goto(URL, { waitUntil: 'domcontentloaded' });
// 3v3 scrimmage is what the lineup / skating shots need; skip the menu.
const captureUrl = new URL(URL);
if (!captureUrl.searchParams.has('mode')) captureUrl.searchParams.set('mode', '3v3');
await page.goto(captureUrl.href, { waitUntil: 'domcontentloaded' });
// The boot overlay is removed once physics is up and the first frame ran.
await page.waitForFunction(() => !document.getElementById('boot'), { timeout: 45000 });
// Mode auto-starts from ?mode=; wait until the match handle is live.
await page.waitForFunction(() => window.tilt?.match, { timeout: 15000 });
// The canvas must fill the window exactly, at whatever pixel ratio. Checked
// at two window sizes so a resize path that only works on first load fails