Carry the court colour into the page background
A phone's rounded display corners clip slivers out of the canvas, and the flat dark body showed through them as a dark notch where the bottom corners curve in. The page background is a two-stop gradient now: dark down to the top safe-area inset, where it sits behind the status bar, then the court's out-area colour for everything below. That colour is read live from the palette rather than hardcoded, because it lerps between the tennis and splatter courts — bright green to dark olive — so a fixed hex would only match in one mode. Written in resolved pixels rather than env() so the declaration can't be invalid and drop the background entirely, and only assigned when the string actually changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
047d6fb665
commit
7b15e10494
3 files changed
+29
-4
No files matched your search
@@ -186,6 +186,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 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
|
||||
visible dark notch where the bottom corners curve in. It is a two-stop gradient: `#10141c` down to
|
||||
the top inset, then `pal.out` for the rest. **`pal.out` must be read live**, because it lerps
|
||||
between the tennis and splatter palettes and any fixed hex would only match in one mode. Written in
|
||||
resolved px rather than `env()` so the declaration can never be invalid and drop the background,
|
||||
and only assigned when the string actually changes.
|
||||
- **The safe area is handled ASYMMETRICALLY, on purpose.** TOP: index.html insets the canvas element
|
||||
below the status bar, because that is opaque UI the scoreboard must clear - `SAFE.top` stays 0, and
|
||||
adding a HUD offset there as well subtracts the notch twice. BOTTOM: the canvas deliberately runs to
|
||||
|
||||
Reference in new issue
Block a user