From 7936d83f0f53162c322139c26d7ad3a0385d22b7 Mon Sep 17 00:00:00 2001 From: Oliver Rieger Date: Tue, 14 Jul 2026 16:18:00 +0200 Subject: [PATCH] Ads: pin courtside boards to the court's back edge, not a fixed baseline offset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ad strip sat 12px above the far baseline, but the out-area lawn reaches z=-6, whose projected edge is ~15.5px above the baseline in portrait (camF is larger there) — so the lawn painted over the bottom of the boards. Pinning the strip's bottom to proj(0,0,-6).y clears them in both orientations. Co-Authored-By: Claude Opus 4.8 --- index.html | 2 +- render.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 41af5ba..5b2637d 100644 --- a/index.html +++ b/index.html @@ -52,6 +52,6 @@

TAP TO START

- + diff --git a/render.js b/render.js index 562ebbb..31e1598 100644 --- a/render.js +++ b/render.js @@ -316,8 +316,11 @@ export function render() { } const pal = palette(), pt = paletteT(); - // stands: the generated crowd, drawn in columns so it can BOUNCE when it cheers - const standsBottom = proj(0, 0, 0).y - 12; + // stands: the generated crowd, drawn in columns so it can BOUNCE when it cheers. + // sit the ad strip flush on the court's back edge (the out-area quad below reaches z=-6); + // pinning to that projected line keeps the boards clear of the lawn in BOTH orientations + // (a fixed baseline offset over-/under-shoots because camF differs portrait vs landscape). + const standsBottom = proj(0, 0, -6).y; const adH = 14, crowdH = standsBottom - adH + 2; const crowdImg = SPR['x_crowd']; if (crowdImg) {