diff --git a/HANDOFF.md b/HANDOFF.md index 5a3ce0f..a042e32 100644 --- a/HANDOFF.md +++ b/HANDOFF.md @@ -193,6 +193,15 @@ zombie (now an occasional opponent, `TUNE.racketEvery`, not the every-game fixtu perspective floor reaches the bottom on any aspect ratio. If you ever add a new orientation or stretch the canvas further, check the bottom rows are opaque — sample `getImageData` alpha, the colour alone will not tell you, because the page behind is deliberately the same green. + **Do NOT try to cover the bottom by extending the out-area quad instead.** `proj()` divides by + `(camZ - z)`, so as z approaches `TUNE.camZ` (48) the scale explodes and past it goes NEGATIVE — + a quad taken to z=60 folded its far edge back above the screen as an inverted triangle. The clear + is what covers the screen; the quad only has to cover the court. +- **The page gradient goes on `document.documentElement`, and `html` needs a real height.** Two + separate CSS traps, both hit: the ROOT element's background is what paints the viewport, so setting + it on `body` while `html` also has a background painted nothing; and a GRADIENT is laid out in the + root's own box, which collapses to zero when the canvas is `position: fixed`, so `html { height: + 100dvh }` is load-bearing rather than cosmetic. - **The page background behind the canvas tracks the live court apron** (`pageBackground` in render.js). It is visible in exactly two places: the strip above the canvas under the status bar, and the slivers a phone's ROUNDED DISPLAY CORNERS clip out of the canvas — a flat dark body drew a diff --git a/index.html b/index.html index c2ea8e5..5b407de 100644 --- a/index.html +++ b/index.html @@ -20,6 +20,10 @@ 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 needs a real HEIGHT: the root element's background paints the viewport, but a GRADIENT is + laid out in the root's own box — and with the canvas position:fixed the root has no content and + collapses, so the gradient render.js sets had nowhere to go. */ + html { height: 100%; height: 100dvh; } html, body { margin: 0; padding: 0; background: #10141c; overflow: hidden; } /* 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) — @@ -40,6 +44,7 @@ top: env(safe-area-inset-top, 0px); left: env(safe-area-inset-left, 0px); width: calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); + height: calc(100vh - env(safe-area-inset-top, 0px)); height: calc(100dvh - env(safe-area-inset-top, 0px)); } #hint { position: fixed; bottom: 8px; width: 100%; text-align: center; font: 400 10px Silkscreen, monospace; color: #6b7688; } @@ -80,6 +85,6 @@
TAP TO START
- +