Skip to content

Instantly share code, notes, and snippets.

@drhayes
Created March 12, 2014 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drhayes/9513977 to your computer and use it in GitHub Desktop.
Save drhayes/9513977 to your computer and use it in GitHub Desktop.
How I'm scaling my 2d Phaser game right now
preload: function() {
game.stage.scale.minWidth = 320;
game.stage.scale.minHeight = 240;
game.stage.scale.maxWidth = 640;
game.stage.scale.maxHeight = 480;
game.stage.scale.pageAlignHorizontally = true;
game.stage.scale.scaleMode = Phaser.StageScaleMode.SHOW_ALL;
game.stage.scale.setShowAll();
game.stage.scale.refresh();
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment