phaser-ce icon indicating copy to clipboard operation
phaser-ce copied to clipboard

Display objects have incorrect `width` & `height` when game.resolution ≠ 1

Open puny-d opened this issue 7 years ago • 4 comments

If I change the game.resolution = 2, the sprite size always be 50x50,which is small in new canvas, I think it should be 100x100.....

puny-d avatar Sep 30 '17 03:09 puny-d

In pixi.js when I change the resolution, the sprite would auto calculate to fit it. So l wonder how could I use it property? And what the meaning of resolution in phaser?

puny-d avatar Sep 30 '17 05:09 puny-d

I'm not sure. In https://codepen.io/samme/pen/QvpBpM it seems to me that the texture size (64 × 64 game pixels) is correct but the sprite size (128 × 128 game pixels) is not.

samme avatar Oct 03 '17 16:10 samme

It worked properly in Phaser v2.6.2 and is broken since at least Phaser CE v2.7.3. Sprites don't scale up when resolution goes up.

tgrajewski avatar Mar 19 '18 16:03 tgrajewski