Rectangle#right

right : number The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property. Source code: geom/Rectangle.js (Line 562)

Rectangle#resize()

resize(width, height) → {Phaser.Rectangle} Resize the Rectangle by providing a new width and height.The x and y positions remain unchanged. Parameters Name Type Description width number The width of the Rectangle. Should always be either zero or a positive value. height number The height of the Rectangle. Should always be either zero or a positive value. Returns Phaser.Rectangle - This Rectangle object Source code: geom/Rectangle.js (Line 241)

Rectangle#Rectangle

new Rectangle(x, y, width, height) Creates a new Rectangle object with the top-left corner specified by the x and y parameters and with the specified width and height parameters.If you call this function without parameters, a Rectangle with x, y, width, and height properties set to 0 is created. Parameters Name Type Description x number The x coordinate of the top-left corner of the Rectangle. y number The y coordinate of the top-left corner of the Rectangle. width number The width of

Rectangle#randomY

randomY : number A random value between the top and bottom values (inclusive) of the Rectangle. Source code: geom/Rectangle.js (Line 661)

Rectangle#randomX

randomX : number A random value between the left and right values (inclusive) of the Rectangle. Source code: geom/Rectangle.js (Line 645)

Rectangle#random()

random(out) → {Phaser.Point} Returns a uniformly distributed random point from anywhere within this Rectangle. Parameters Name Type Argument Description out Phaser.Point | object <optional> A Phaser.Point, or any object with public x/y properties, that the values will be set in. If no object is provided a new Phaser.Point object will be created. In high performance areas avoid this by re-using an existing object. Returns Phaser.Point - An object containing the random point in

Rectangle#perimeter

[readonly] perimeter : number The perimeter size of the Rectangle. This is the sum of all 4 sides. Source code: geom/Rectangle.js (Line 597)

Rectangle#offsetPoint()

offsetPoint(point) → {Phaser.Rectangle} Adjusts the location of the Rectangle object using a Point object as a parameter. This method is similar to the Rectangle.offset() method, except that it takes a Point object as a parameter. Parameters Name Type Description point Phaser.Point A Point object to use to offset this Rectangle object. Returns Phaser.Rectangle - This Rectangle object. Source code: geom/Rectangle.js (Line 71)

Rectangle#offset()

offset(dx, dy) → {Phaser.Rectangle} Adjusts the location of the Rectangle object, as determined by its top-left corner, by the specified amounts. Parameters Name Type Description dx number Moves the x value of the Rectangle object by this amount. dy number Moves the y value of the Rectangle object by this amount. Returns Phaser.Rectangle - This Rectangle object. Source code: geom/Rectangle.js (Line 55)

Rectangle#left

left : number The x coordinate of the left of the Rectangle. Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property. Source code: geom/Rectangle.js (Line 540)