Video: la partita completa rigirata sul gioco di oggi, il trailer e la versione extended (copioni, prova locale, montaggio --trailer) (Andrea)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GiECd9KMfjthRUnujCGSzZ
This commit is contained in:
2026-10-29 18:47:44 +01:00
co-authored by Claude Opus 5.5
parent 0f1740a7ad
commit 81a1dd1bc3
5 changed files with 544 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
// Prova locale di un copione del trailer, senza la VM: un finto «d» col solo necessario, una schermata per battuta.
// OUT=/tmp/prova COPIONE=./trailer-extended.mjs node video/prova-locale.mjs
import { chromium } from 'playwright';
import { staticServer } from '../tests/helpers.mjs';
const server = await staticServer();
const browser = await chromium.launch({ args: ['--autoplay-policy=no-user-gesture-required', '--use-gl=angle', '--use-angle=swiftshader', '--enable-unsafe-swiftshader'] });
const out = process.env.OUT;
try {
const page = await browser.newPage({ viewport: { width: 1600, height: 900 } });
page.on('pageerror', e => console.log('ERR', e.message));
const orig = page.goto.bind(page);
page.goto = url => orig(url.replace('http://127.0.0.1:8000/', `http://127.0.0.1:${server.port}/`));
const mod = await import(process.env.COPIONE ?? './trailer.mjs');
const t0 = Date.now(); let n = 0;
const d = { page, vm: () => {}, cue: async id => { console.log(((Date.now() - t0) / 1000).toFixed(1), id); setTimeout(() => page.screenshot({ path: `${out}/tr-${String(++n).padStart(2, '0')}-${id}.png` }), id === 'buio' ? 5000 : 3000); } };
await mod.setup(d);
await mod.run(d);
console.log('fine', ((Date.now() - t0) / 1000).toFixed(1));
} finally { await browser.close(); server.kill(); }