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.
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. |
The inflated Rectangle.