diff --git a/HANDOFF.md b/HANDOFF.md index ee2eabd..01a0beb 100644 --- a/HANDOFF.md +++ b/HANDOFF.md @@ -182,6 +182,14 @@ zombie (now an occasional opponent, `TUNE.racketEvery`, not the every-game fixtu because the wave grows with `hordeGrow` while the panic button was a flat 1 s; he chose scaling the melee over shrinking the horde. **Measure the crowd BEFORE calling `meleeSwipe`** — it kills everything in reach, so counting after counts the survivors and the cooldown barely moves. +- **The canvas is deliberately FULL-BLEED under the notch and home indicator; the HUD is what respects + the safe area.** `viewport-fit=cover` is set, and the stands running to the screen edges look right — + but an iPhone's clock was landing directly on the scoreboard. A hidden `#safe` probe div carries + `env(safe-area-inset-*)` (env() is only readable from CSS), `measureSafe()` converts it to LOGICAL + canvas px using the same scale `fitViewport` just applied, and `SAFE.top`/`SAFE.bottom` shift the + scoreboard down and lift the rack + `METER_Y` up. Anything new that anchors to the very top or very + bottom of the screen must offset by these too — and the rack's hit test shares `rackGeom`, so taps + follow automatically. - **`UI` in config.js is the accent palette** (hot/warm/pick/cream/dim/bad/ball). Every HUD colour goes through it. Gore reds are deliberately NOT in it — the splatter stays loud. - **`F(size, bold)` in render.js builds every canvas font string.** Bare `monospace` resolves to diff --git a/index.html b/index.html index 49bcd1b..a6d46a1 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,12 @@ src: url('assets/fonts/Silkscreen-Regular.ttf') format('truetype'); } @font-face { font-family: 'Silkscreen'; font-weight: 700; font-display: block; src: url('assets/fonts/Silkscreen-Bold.ttf') format('truetype'); } - html, body { margin: 0; height: 100%; background: #10141c; display: grid; place-items: center; } + html, body { margin: 0; height: 100%; height: 100dvh; background: #10141c; display: grid; place-items: center; } + /* invisible probe: env() is only readable from CSS, so park the insets on an element and let + render.js measure them. The canvas stays FULL-BLEED (the stands under the notch look good) — + it is the HUD that has to move, see SAFE in render.js. */ + #safe { position: fixed; top: 0; left: 0; width: 0; height: 0; pointer-events: none; visibility: hidden; + padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); } canvas { image-rendering: pixelated; width: min(96vw, calc(96vh * 16 / 9)); aspect-ratio: 16/9; touch-action: none; } #hint { position: fixed; bottom: 8px; width: 100%; text-align: center; font: 400 10px Silkscreen, monospace; color: #6b7688; } @@ -45,6 +50,7 @@
+TAP TO START