Jump to content

Scaling to fit browser window (without changing aspect ratio)


Recommended Posts

Hey folks,

I would like my game to be able to scale to fit the browser window while keeping the aspect ratio of the game. I have tried setting the fullscreenScaleMode to Phaser.StageScaleMode.SHOW_ALL but it still stretches everything to completely fill the window. Let's say the game resolution is 800 x 480 and the window is 1700 x 1000, I would want the scale to be 2 so that it would be 1600 x 960. This would be as much as the game could scale without stretching things.

I really appreciate any tips you have on how to accomplish this.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...