I always forget what kind of scale modes does Phaser js has. So here is the list…

I wrote this list of scale modes of Phaser engine, so later if I forgot I can take a look at it easily:

////ignore aspect ratio:
//mode: Phaser.Scale.RESIZE,

////keep aspect ratio:
//mode: Phaser.Scale.FIT,
//mode: Phaser.Scale.ENVELOP, // larger than Scale.FIT
//mode: Phaser.Scale.HEIGHT_CONTROLS_WIDTH, // auto width
//mode: Phaser.Scale.WIDTH_CONTROLS_HEIGHT, // auto height

//autoCenter: Phaser.Scale.NO_CENTER,
//autoCenter: Phaser.Scale.CENTER_BOTH,
//autoCenter: Phaser.Scale.CENTER_HORIZONTALLY,
//autoCenter: Phaser.Scale.CENTER_VERTICALLY,

Leave a Reply

Your email address will not be published. Required fields are marked *