Fix WorldTextPass labels scaling with device-pixel-ratio

Attack troop labels, the ghost-cost chip, and the bonusPopup
minScreenScale floor were dividing by `zoom`, which Camera.ts stores
as device-pixels-per-world-unit (canvasW = cssWidth * dpr). The result
was constant device-pixel size — labels rendered ~2x larger on DPR=1
displays than on retina. Multiply each screen-relative scale by dpr so
the on-screen size stays constant in CSS pixels.

Retune the now-correct sizes: attack labels 34 -> 17, ghost-cost
screenScale 30 -> 18, screenYOffset 50 -> 25.
This commit is contained in:
evanpelle
2026-06-03 21:40:00 -07:00
parent 96c032850d
commit 986f0b61bf
2 changed files with 16 additions and 7 deletions
+2 -2
View File
@@ -270,8 +270,8 @@
"cullZoom": 0.3
},
"ghostCost": {
"screenScale": 30,
"screenYOffset": 50
"screenScale": 18,
"screenYOffset": 25
},
"spawnOverlay": {
"highlightRadius": 9,