Global

Type Definitions

DisplayObject

Type:
  • object
Source:
src/core/Group.js line 3163

GameConfig

A configuration object for Phaser.Game.

Type:
  • object
Properties:
Name Type Argument Default Description
GameConfig.alignH boolean <optional>
false

Sets Phaser.ScaleManager#pageAlignHorizontally.

GameConfig.alignV boolean <optional>
false

Sets Phaser.ScaleManager#pageAlignVertically.

GameConfig.antialias number | string <optional>
true
GameConfig.backgroundColor number | string <optional>
0

Sets Phaser.Stage#backgroundColor.

GameConfig.canvas HTMLCanvasElement <optional>

An existing canvas to display the game in.

GameConfig.canvasId string <optional>

id attribute value to assign to the game canvas.

GameConfig.canvasStyle string <optional>

style attribute value to assign to the game canvas.

GameConfig.crisp boolean <optional>
false

Sets the canvas's image-rendering property to pixelated or crisp-edges. See Phaser.Canvas.setImageRenderingCrisp.

GameConfig.disableVisibilityChange boolean <optional>
false

Sets Phaser.Stage#disableVisibilityChange

GameConfig.disableStart boolean <optional>
false

Prevents the game loop from starting, allowing you to call updates manually. Helpful for automated testing.

GameConfig.enableDebug boolean <optional>
true

Enable Phaser.Utils.Debug. You can gain a little performance by disabling this in production.

GameConfig.failIfMajorPerformanceCaveat boolean <optional>

Abort WebGL context creation if performance would be poor. You can use this with renderer AUTO.

GameConfig.forceSetTimeout boolean <optional>

Use setTimeOut for the game loop even if requestAnimationFrame is available.

GameConfig.fullScreenScaleMode number <optional>

The scaling method used by the ScaleManager when in fullscreen.

GameConfig.fullScreenTarget HTMLElement <optional>

The DOM element on which the Fullscreen API enter request will be invoked.

GameConfig.height number | string <optional>
600
GameConfig.multiTexture boolean <optional>
false

Enable support for multiple bound Textures in WebGL. Same as {renderer: Phaser.WEBGL_MULTI}.

GameConfig.parent string | HTMLElement <optional>
''

The DOM element into which this games canvas will be injected.

GameConfig.physicsConfig object <optional>
GameConfig.preserveDrawingBuffer boolean <optional>
false

Whether or not the contents of the stencil buffer is retained after rendering.

GameConfig.renderer number <optional>
Phaser.AUTO
GameConfig.resolution number <optional>
1

The resolution of your game, as a ratio of canvas pixels to game pixels.

GameConfig.roundPixels boolean <optional>
false

Round pixel coordinates for rendering (rather than interpolating). Handy for crisp pixel art and speed on legacy devices.

GameConfig.scaleH number <optional>
1

Horizontal scaling factor for USER_SCALE scale mode.

GameConfig.scaleMode number <optional>

The scaling method used by the ScaleManager when not in fullscreen.

GameConfig.scaleV number <optional>
1

Vertical scaling factor for USER_SCALE scale mode.

GameConfig.seed number <optional>

Seed for Phaser.RandomDataGenerator.

GameConfig.state object <optional>
GameConfig.transparent boolean <optional>
false
GameConfig.trimH number <optional>
0

Horizontal trim for USER_SCALE scale mode.

GameConfig.trimV number <optional>
0

Vertical trim for USER_SCALE scale mode.

GameConfig.width number | string <optional>
800
Source:
src/core/Game.js line 525

phaser-ce@2.10.0 is on GitHub and NPM

Documentation generated by JSDoc 3.5.4 on 2018-01-18 using Tomorrow.