mirror of
https://github.com/photonstorm/phaser
synced 2024-11-14 08:58:00 +00:00
Config#snapWidth
and Config#snapHeight
are new properties in the Game Config that hold the parsed snap
config values, as used by the Scale Manager.
This commit is contained in:
parent
1199178eff
commit
d2ce0f9358
2 changed files with 11 additions and 0 deletions
|
@ -121,6 +121,16 @@ var Config = new Class({
|
|||
*/
|
||||
this.maxHeight = GetValue(scaleConfig, 'max.height', 0, config);
|
||||
|
||||
/**
|
||||
* @const {number} Phaser.Core.Config#snapWidth - The horizontal amount to snap the canvas by when the Scale Manager is resizing. A value of zero means no snapping.
|
||||
*/
|
||||
this.snapWidth = GetValue(scaleConfig, 'snap.width', 0, config);
|
||||
|
||||
/**
|
||||
* @const {number} Phaser.Core.Config#snapHeight - The vertical amount to snap the canvas by when the Scale Manager is resizing. A value of zero means no snapping.
|
||||
*/
|
||||
this.snapHeight = GetValue(scaleConfig, 'snap.height', 0, config);
|
||||
|
||||
/**
|
||||
* @const {number} Phaser.Core.Config#renderType - Force Phaser to use a specific renderer. Can be `CONST.CANVAS`, `CONST.WEBGL`, `CONST.HEADLESS` or `CONST.AUTO` (default)
|
||||
*/
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
* @property {Phaser.Scale.ScaleModeType} [mode=Phaser.Scale.ScaleModes.NONE] - The scale mode.
|
||||
* @property {WidthHeight} [min] - The minimum width and height the canvas can be scaled down to.
|
||||
* @property {WidthHeight} [max] - The maximum width the canvas can be scaled up to.
|
||||
* @property {WidthHeight} [snap] - Set the snapping values used by the Scale Manager when resizing the canvas. See `ScaleManager.setSnap` for details.
|
||||
* @property {boolean} [autoRound=false] - Automatically round the display and style sizes of the canvas. This can help with performance in lower-powered devices.
|
||||
* @property {Phaser.Scale.CenterType} [autoCenter=Phaser.Scale.Center.NO_CENTER] - Automatically center the canvas within the parent?
|
||||
* @property {number} [resizeInterval=500] - How many ms should elapse before checking if the browser size has changed?
|
||||
|
|
Loading…
Reference in a new issue