sifon Posted May 14, 2015 Share Posted May 14, 2015 Hello all! I'm having a problem developing a Phaser game for mobile devices, the aspect ratio is fixed as 4:3, so I adjust the canvas size to keep that aspect ratio. When the user is changing the orientation, the canvas is keeping the same aspect ratio but is getting bigger. My problem is when I set the new size to Phaser game object, it is upscaling the content inside and is pixelated. My code looks like this: var taskAspect = 4/3, screenHeight = window.innerHeight, screenWidth = window.innerWidth, screenAspect = screenWidth / screenHeight; if (screenAspect < taskAspect) { game.width = screenWidth; game.height = game.width / taskAspect; } else { game.height = screenHeight; game.width = game.height * taskAspect; }My question is: is possible to change Phaser game size telling Phaser: "ey, I want to change game size but please don't scale content inside!!" ? Thanks a lot! Link to comment Share on other sites More sharing options...
Recommended Posts