Phaser API Documentation

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

Description:

Scales the width and height of this Rectangle by the given amounts.

Parameters:

name type description
rect Phaser.Geom.Rectangle

The Rectangle object that will be scaled by the specified amount(s).

x number

The factor by which to scale the rectangle horizontally.

y number

The amount by which to scale the rectangle vertically. If this is not specified, the rectangle will be scaled by the factor x in both directions.

Returns:
Description:

The rectangle object with updated width and height properties as calculated from the scaling factor(s).

Since: 3.0.0