five-on-it / apps/client/src/renderer/build-preview
apps/client/src/renderer/build-preview
A build's level seen before anyone plays it (?preview=<artifact hash>, or a build's id the signed-in creator owns): the artifact asked of the page's platform (GET /artifacts/:hash, public by its hash; a build's id is first read as the creator's build), kept in the browser by its hash (level-cache.ts' loadByHash), its level drawn as the game draws it (scene.ts' buildLevel), and the galleries' free camera over it (gallery-camera.ts: W A S D, the wheel, the mouse, 1–3 the heights) with their panel (gallery-ui.ts): the game's places and the level's spawns to find by name and fly to, the whole mapped. It opens over the first spawn. Your games links each draft's last good build here, and the MCP server's draft_build answers with the link. window.__preview() tells the end-to-end tests what is shown.