Jump to content

how to make the Phaser.Game size according to device


parwaniprakash
 Share

Recommended Posts

Hello parwanikaprash

 

I just found a code that works fine and do exactly what you're looking for:

 

If you have a 'boot.js' file, you can put these lines on the 'create' function

 

game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;game.scale.pageAlignHorizontally = true;game.scale.pageAlignVertically = true;game.scale.setScreenSize(true);

I tried it and works wonderful.

Hope I helped you!

 

Gonzalo.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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