Ads: pin courtside boards to the court's back edge, not a fixed baseline offset

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 <noreply@anthropic.com>
This commit is contained in:
wuwiandClaude Opus 4.8 committed 2026-07-14 16:18:00 +02:00
1 parent 37e5bfd10f
commit 7936d83f0f
2 files changed
+6 -3

No files matched your search

+1 -1
View File
@@ -52,6 +52,6 @@
<p class="start">TAP TO START</p>
</div>
</div>
<script type="module" src="main.js?v=15"></script>
<script type="module" src="main.js?v=16"></script>
</body>
</html>
+5 -2
View File
@@ -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) {