Phaser API Documentation

  Version: 
refresh([previousWidth], [previousHeight])

Description:

Refreshes the internal scale values, bounds sizes and orientation checks.

Once finished, dispatches the resize event.

This is called automatically by the Scale Manager when the browser window size changes, as long as it is using a Scale Mode other than 'NONE'.

Parameters:

name type arguments description
previousWidth number <optional>

The previous width of the game. Only set if the gameSize has changed.

previousHeight number <optional>

The previous height of the game. Only set if the gameSize has changed.

Returns:
Description:

The Scale Manager instance.

Since: 3.16.0