name | type | arguments | Default | description |
---|---|---|---|---|
width | number | string | <optional> | 1024 |
The base width of your game. Can be an integer or a string: '100%'. If a string it will only work if you have set a parent element that has a size. |
height | number | string | <optional> | 768 |
The base height of your game. Can be an integer or a string: '100%'. If a string it will only work if you have set a parent element that has a size. |
zoom | number | Phaser.Scale.ZoomType | <optional> | 1 |
The zoom value of the game canvas. |
parent | HTMLElement | string | <optional> |
The DOM element that will contain the game canvas, or its |
|
expandParent | boolean | <optional> | true |
Is the Scale Manager allowed to adjust the CSS height property of the parent and/or document body to be 100%? |
mode | Phaser.Scale.ScaleModeType | <optional> | Phaser.Scale.ScaleModes.NONE |
The scale mode. |
min | WidthHeight | <optional> |
The minimum width and height the canvas can be scaled down to. |
|
max | WidthHeight | <optional> |
The maximum width the canvas can be scaled up to. |
|
snap | WidthHeight | <optional> |
Set the snapping values used by the Scale Manager when resizing the canvas. See |
|
autoRound | boolean | <optional> | false |
Automatically round the display and style sizes of the canvas. This can help with performance in lower-powered devices. |
autoCenter | Phaser.Scale.CenterType | <optional> | Phaser.Scale.Center.NO_CENTER |
Automatically center the canvas within the parent? |
resizeInterval | number | <optional> | 500 |
How many ms should elapse before checking if the browser size has changed? |
fullscreenTarget | HTMLElement | string | <optional> |
The DOM element that will be sent into full screen mode, or its |