Phaser API Documentation

  Version: 

Member of: Phaser.Structs.Size

resize(width, [height])

Description:

Sets a new width and height for this Size component and updates the aspect ratio based on them.

It doesn't change the aspectMode and still factors in size limits such as the min max and parent bounds.

Parameters:

name type arguments Default description
width number

The new width of the Size component.

height number <optional> width

The new height of the Size component. If not given, it will use the width.

Returns:
Description:

This Size component instance.

Since: 3.16.0
Source: src/structs/Size.js (Line 380)