Phaser API Documentation

  Version: 

Member of: Phaser.Structs.Size

setWidth(width)

Description:

Sets the width of this Size component.

Depending on the aspect mode, changing the width may also update the height and aspect ratio.

Parameters:

name type description
width number

The new width of the Size component.

Returns:
Description:

This Size component instance.

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