Rectangle#scale()

scale(x, y) → {Phaser.Rectangle}

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

Parameters
Name Type Argument Description
x number

The amount to scale the width of the Rectangle by. A value of 0.5 would reduce by half, a value of 2 would double the width, etc.

y number <optional>

The amount to scale the height of the Rectangle by. A value of 0.5 would reduce by half, a value of 2 would double the height, etc.

Returns

This Rectangle object

Source code: geom/Rectangle.js (Line 103)
doc_phaser
2017-02-14 11:07:04
Comments
Leave a Comment

Please login to continue.