Namespace: Events

Phaser.Scale. Events

Events


ENTER_FULLSCREEN

The Scale Manager has successfully entered fullscreen mode.

Since: 3.16.1
Source: src/scale/events/ENTER_FULLSCREEN_EVENT.js (Line 7)

FULLSCREEN_FAILED

The Scale Manager tried to enter fullscreen mode but failed.

Since: 3.17.0
Source: src/scale/events/FULLSCREEN_FAILED_EVENT.js (Line 7)

FULLSCREEN_UNSUPPORTED

The Scale Manager tried to enter fullscreen mode, but it is unsupported by the browser.

Since: 3.16.1
Source: src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js (Line 7)

LEAVE_FULLSCREEN

The Scale Manager was in fullscreen mode, but has since left, either directly via game code, or via a user gestured, such as pressing the ESC key.

Since: 3.16.1
Source: src/scale/events/LEAVE_FULLSCREEN_EVENT.js (Line 7)

ORIENTATION_CHANGE

The Scale Manager Orientation Change Event.

Parameters:
Name Type Description
orientation string
Since: 3.16.1
Source: src/scale/events/ORIENTATION_CHANGE_EVENT.js (Line 7)

RESIZE

The Scale Manager Resize Event.

This event is dispatched whenever the Scale Manager detects a resize event from the browser. It sends three parameters to the callback, each of them being Size components. You can read the width, height, aspectRatio and other properties of these components to help with scaling your own game content.

Parameters:
Name Type Description
gameSize Phaser.Structs.Size

A reference to the Game Size component. This is the un-scaled size of your game canvas.

baseSize Phaser.Structs.Size

A reference to the Base Size component. This is the game size multiplied by resolution.

displaySize Phaser.Structs.Size

A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.

resolution number

The current resolution. Defaults to 1 at the moment.

previousWidth number

If the gameSize has changed, this value contains its previous width, otherwise it contains the current width.

previousHeight number

If the gameSize has changed, this value contains its previous height, otherwise it contains the current height.

Since: 3.16.1
Source: src/scale/events/RESIZE_EVENT.js (Line 7)