Phaser API Documentation

  Version: 
setGameSize(width, height)

Description:

This method will set a new size for your game.

It should only be used if you're looking to change the base size of your game and are using one of the Scale Manager scaling modes, i.e. FIT. If you're using NONE and wish to change the game and canvas size directly, then please use the resize method instead.

Parameters:

name type description
width number

The new width of the game.

height number

The new height of the game.

Returns:
Description:

The Scale Manager instance.

Since: 3.16.0