Namespace: Core

Phaser. Core

Classes

Config
TimeStep

Namespaces

Events

Methods


<static> CreateRenderer(game)

Called automatically by Phaser.Game and responsible for creating the renderer it will use.

Relies upon two webpack global flags to be defined: WEBGL_RENDERER and CANVAS_RENDERER during build time, but not at run-time.

Parameters:
Name Type Description
game Phaser.Game

The Phaser.Game instance on which the renderer will be set.

Since: 3.0.0
Source: src/core/CreateRenderer.js (Line 12)

<static> DebugHeader(game)

Called automatically by Phaser.Game and responsible for creating the console.log debug header.

You can customize or disable the header via the Game Config object.

Parameters:
Name Type Description
game Phaser.Game

The Phaser.Game instance which will output this debug header.

Since: 3.0.0
Source: src/core/DebugHeader.js (Line 9)

<static> VisibilityHandler(game)

The Visibility Handler is responsible for listening out for document level visibility change events. This includes visibilitychange if the browser supports it, and blur and focus events. It then uses the provided Event Emitter and fires the related events.

Parameters:
Name Type Description
game Phaser.Game

The Game instance this Visibility Handler is working on.

Since: 3.0.0
Source: src/core/VisibilityHandler.js (Line 9)
Fires: