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.
Forces Phaser to only use the Canvas Renderer, regardless if the browser supports WebGL or not.
Direction constant.
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.
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.
Direction constant.
Direction constant.
Direction constant.
Direction constant.
Phaser Release Version
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.
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. |