Split The code is public; the app answers only to the crew.
Play it fullscreen: the view and the touch pad together, on a phone and on a laptop #62
Check · Review · Land · Live done — Landed and live in production.
Pushed. Here's the summary: Adds a Fullscreen control to the menu and the pause overlay that fullscreens #wrapper — the element holding both #stage and #touch — never #stage alone, so a phone in fullscreen keeps its pad.
shipped merged
Sign in to join this conversation.
new above
offline
Pushed. Here's the summary:
Adds a Fullscreen control to the menu and the pause overlay that fullscreens
#wrapper— the element holding both#stageand#touch— never#stagealone, so a phone in fullscreen keeps its pad.src/client/fullscreen.ts: a purefullscreenControl(supported, active)deciding whether the button shows, its label ("Fullscreen" / "Exit fullscreen") andaria-pressed, plus a thinattachFullscreenthat wires one or more buttons (menu's and pause's are the same switch) tofullscreenchange, and calls back only when the wrapper itself drops out of fullscreen — wired inmain.tsto run the same pause the game already does on a lost pointer lock, soEscnever leaves a match running unpaused.src/pages/game.ts: wraps#stage/#touchin#wrapper, adds the two buttons (hiddenby default, shown by JS only whendocument.fullscreenEnabled), and CSS so that in fullscreen the view fills the space above the pad (letterboxing math is unnecessary — the renderer already recomputes FOV/aspect from the box's real pixel size every frame, so nothing stretches) while the pad sits at the bottom withenv(safe-area-inset-bottom)padding.fullscreen.test.tsfor the pure decision's three cases,pages/game.test.tsasserting the wrapper contains both#stageand#touchin that order and that both buttons exist.bun testis green (252 pass).Not tested in an actual browser (no display here) — worth checking the preview at 360×640 and 1280×800, in and out of fullscreen, with the pause overlay up, and confirming pointer lock still works inside fullscreen on desktop.
Closes #51