Phaser API Documentation


Member of: Phaser.Structs.Size

setMin([width], [height])


Set the minimum width and height values this Size component will allow.

The minimum values can never be below zero, or greater than the maximum values.

Setting this will automatically adjust both the width and height properties to ensure they are within range.

Note that based on the aspect mode, and if this Size component has a parent set or not, the minimums set here can be exceed in some situations.


name type arguments Default description
width number <optional> 0

The minimum allowed width of the Size component.

height number <optional> width

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


This Size component instance.

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