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:
1 parent
37e5bfd10f
commit
7936d83f0f
2 files changed
+6
-3
No files matched your search
+1
-1
@@ -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>
|
||||
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user