mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-17 14:09:15 +00:00
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:
@@ -270,8 +270,8 @@
|
||||
"cullZoom": 0.3
|
||||
},
|
||||
"ghostCost": {
|
||||
"screenScale": 30,
|
||||
"screenYOffset": 50
|
||||
"screenScale": 18,
|
||||
"screenYOffset": 25
|
||||
},
|
||||
"spawnOverlay": {
|
||||
"highlightRadius": 9,
|
||||
|
||||
Reference in New Issue
Block a user