79614068

Date: 2025-05-09 12:02:29
Score: 1
Natty:
Report link

You need to consider the scale of the canvas when getting the width or height. I always use this piece of code:

let stageW = (stage.canvas.width/stage.scaleX);
let stageH = (stage.canvas.width/stage.scaleY);

Then if I need to reference the width or height of the canvas I just use the variables stageW or stageH.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user30491655