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...
//autoCenter: Phaser.Scale.NO_CENTER,
//autoCenter: Phaser.Scale.CENTER_BOTH,
//autoCenter: Phaser.Scale.CENTER_HORIZONTALLY,
//autoCenter: Phaser.Scale.CENTER_VERTICALLY,
loading...

Leave a Reply

Your email address will not be published.