Phaser API Documentation

  Version: 
<static> Inflate(rect, x, y)

Description:

Increases the size of a Rectangle by a specified amount.

The center of the Rectangle stays the same. The amounts are added to each side, so the actual increase in width or height is two times bigger than the respective argument.

Parameters:

name type description
rect Phaser.Geom.Rectangle

The Rectangle to inflate.

x number

How many pixels the left and the right side should be moved by horizontally.

y number

How many pixels the top and the bottom side should be moved by vertically.

Returns:
Description:

The inflated Rectangle.

Since: 3.0.0