Skip to main content
Version: Phaser v4.0.0

Phaser

VERSION

VERSION: string

Description:

Phaser Release Version

Source: src/const.js#L15
Since: 3.0.0

LOG_VERSION

LOG_VERSION: string

Description:

Phaser Release Version as displayed in the console.log header URL.

Source: src/const.js#L25
Since: 3.87.0

AUTO

AUTO: number

Description:

This setting will auto-detect if the browser is capable of supporting WebGL. If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.

Source: src/const.js#L39
Since: 3.0.0

CANVAS

CANVAS: number

Description:

Forces Phaser to only use the Canvas Renderer, regardless if the browser supports WebGL or not.

Source: src/const.js#L50
Since: 3.0.0

WEBGL

WEBGL: number

Description:

Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is no fallback to Canvas with this setting, so you should trap it and display a suitable message to the user.

Source: src/const.js#L61
Since: 3.0.0

HEADLESS

HEADLESS: number

Description:

A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still absolutely relies on the DOM being present and available. This mode is meant for unit testing, not for running Phaser on the server, which is something you really shouldn't do.

Source: src/const.js#L73
Since: 3.0.0

FOREVER

FOREVER: number

Description:

In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead to help you remember what the value is doing in your code.

Source: src/const.js#L85
Since: 3.0.0

NONE

NONE: number

Description:

Direction constant representing no direction, or an unset direction. Used in various Phaser systems such as physics and input where a direction value is required but none applies.

Source: src/const.js#L96
Since: 3.0.0

UP

UP: number

Description:

Direction constant representing upward movement or orientation. Used in physics, tilemaps, and other Phaser systems that work with cardinal directions.

Source: src/const.js#L107
Since: 3.0.0

DOWN

DOWN: number

Description:

Direction constant representing downward movement or orientation. Used in physics, tilemaps, and other Phaser systems that work with cardinal directions.

Source: src/const.js#L118
Since: 3.0.0

LEFT

LEFT: number

Description:

Direction constant representing leftward movement or orientation. Used in physics, tilemaps, and other Phaser systems that work with cardinal directions.

Source: src/const.js#L129
Since: 3.0.0

RIGHT: number

Description:

Direction constant representing rightward movement or orientation. Used in physics, tilemaps, and other Phaser systems that work with cardinal directions.

Source: src/const.js#L140
Since: 3.0.0