Namespace: Phaser

Phaser

Classes

FacebookInstantGamesLeaderboard
FacebookInstantGamesPlugin
Game
Scene

Namespaces

Actions
Animations
BlendModes
Cache
Cameras
Core
Create
Curves
Data
Device
Display
DOM
Events
GameObjects
Geom
Input
Loader
Math
Physics
Plugins
Renderer
Scale
ScaleModes
Scenes
Sound
Structs
Textures
Tilemaps
Time
Tweens
Types
Utils

Members


<static, constant> AUTO :number

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

Type:
  • number
Since: 3.0.0
Source: src/const.js (Line 29)

<static, constant> CANVAS :number

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

Type:
  • number
Since: 3.0.0
Source: src/const.js (Line 40)

<static, constant> DOWN :number

Direction constant.

Type:
  • number
Since: 3.0.0
Source: src/const.js (Line 106)

<static, constant> FOREVER :number

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.

Type:
  • number
Since: 3.0.0
Source: src/const.js (Line 75)

<static, constant> HEADLESS :number

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.

Type:
  • number
Since: 3.0.0
Source: src/const.js (Line 63)

<static, constant> LEFT :number

Direction constant.

Type:
  • number
Since: 3.0.0
Source: src/const.js (Line 116)

<static, constant> NONE :number

Direction constant.

Type:
  • number
Since: 3.0.0
Source: src/const.js (Line 86)

<static, constant> RIGHT :number

Direction constant.

Type:
  • number
Since: 3.0.0
Source: src/const.js (Line 126)

<static, constant> UP :number

Direction constant.

Type:
  • number
Since: 3.0.0
Source: src/const.js (Line 96)

<static, constant> VERSION :string

Phaser Release Version

Type:
  • string
Since: 3.0.0
Source: src/const.js (Line 15)

<static, constant> WEBGL :number

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.

Type:
  • number
Since: 3.0.0
Source: src/const.js (Line 51)

Type Definitions


DeviceConf

Type:
  • object
Properties:
Name Type Description
os Phaser.Device.OS

The OS Device functions.

browser Phaser.Device.Browser

The Browser Device functions.

features Phaser.Device.Features

The Features Device functions.

input Phaser.Device.Input

The Input Device functions.

audio Phaser.Device.Audio

The Audio Device functions.

video Phaser.Device.Video

The Video Device functions.

fullscreen Phaser.Device.Fullscreen

The Fullscreen Device functions.

canvasFeatures Phaser.Device.CanvasFeatures

The Canvas Device functions.

Source: src/device/index.js (Line 17)