Global

Type Definitions

DisplayObject

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

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.clearBeforeRender boolean <optional>
true

Sets Phaser.Game#clearBeforeRender.

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.keyboard boolean <optional>
true

Starts the keyboard input handler.

GameConfig.maxPointers number <optional>
-1

Sets Phaser.Input#maxPointers.

GameConfig.mouse boolean <optional>
true

Starts the mouse input handler, if the mspointer and touch handlers were not started.

GameConfig.mouseWheel boolean <optional>
true

Starts the mouse wheel handler, if supported by the device.

GameConfig.mspointer boolean <optional>
true

Starts the Pointer Events handler (mspointer), if supported by the device.

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.pointerLock boolean <optional>
true

Starts the Pointer Lock handler, if supported by the device.

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.touch boolean <optional>
true

Starts the touch handler, if supported by the device and the Pointer Events handler (mspointer) was not started.

GameConfig.transparent boolean | string <optional>
false

Sets Phaser.Game#transparent. 'notMultiplied' disables the WebGL context attribute premultipliedAlpha.

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 528

InputConfig

Type:
  • object
Properties:
Name Type Argument Default Description
keyboard boolean <optional>
true
maxPointers boolean <optional>
-1
mouse boolean <optional>
true
mouseWheel boolean <optional>
true
mspointer boolean <optional>
true
pointerLock boolean <optional>
true
touch boolean <optional>
true
Source:
src/input/Input.js line 417

phaser-ce@2.11.0 is on GitHub and NPM

Documentation generated by JSDoc 3.5.4 on 2018-06-26 using Tomorrow.