Rectangle.inflate()

<static> inflate(a, dx, dy) → {Phaser.Rectangle} Increases the size of the Rectangle object by the specified amounts. The center point of the Rectangle object stays the same, and its size increases to the left and right by the dx value, and to the top and the bottom by the dy value. Parameters Name Type Description a Phaser.Rectangle The Rectangle object. dx number The amount to be added to the left side of the Rectangle. dy number The amount to be added to the bottom side of th

Rectangle.equals()

<static> equals(a, b) → {boolean} Determines whether the two Rectangles are equal.This method compares the x, y, width and height properties of each Rectangle. Parameters Name Type Description a Phaser.Rectangle The first Rectangle object. b Phaser.Rectangle The second Rectangle object. Returns boolean - A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false. Source code: geom/Rectangle.js (Line 906)

Rectangle.containsRect()

<static> containsRect(a, b) → {boolean} Determines whether the first Rectangle object is fully contained within the second Rectangle object.A Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first. Parameters Name Type Description a Phaser.Rectangle The first Rectangle object. b Phaser.Rectangle The second Rectangle object. Returns boolean - A value of true if the Rectangle object contains the specified po

Rectangle.containsRaw()

<static> containsRaw(rx, ry, rw, rh, x, y) → {boolean} Determines whether the specified coordinates are contained within the region defined by the given raw values. Parameters Name Type Description rx number The x coordinate of the top left of the area. ry number The y coordinate of the top left of the area. rw number The width of the area. rh number The height of the area. x number The x coordinate of the point to test. y number The y coordinate of the point to test. Re

Rectangle.containsPoint()

<static> containsPoint(a, point) → {boolean} Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. This method is similar to the Rectangle.contains() method, except that it takes a Point object as a parameter. Parameters Name Type Description a Phaser.Rectangle The Rectangle object. point Phaser.Point The point object being checked. Can be Point or any object with .x and .y values. Returns boolean - A value of tru

Rectangle.contains()

<static> contains(a, x, y) → {boolean} Determines whether the specified coordinates are contained within the region defined by this Rectangle object. Parameters Name Type Description a Phaser.Rectangle The Rectangle object. x number The x coordinate of the point to test. y number The y coordinate of the point to test. Returns boolean - A value of true if the Rectangle object contains the specified point; otherwise false. Source code: geom/Rectangle.js (Line 837)

Rectangle.clone()

<static> clone(a, output) → {Phaser.Rectangle} Returns a new Rectangle object with the same values for the x, y, width, and height properties as the original Rectangle object. Parameters Name Type Argument Description a Phaser.Rectangle The Rectangle object. output Phaser.Rectangle <optional> Optional Rectangle object. If given the values will be set into the object, otherwise a brand new Rectangle object will be created and returned. Returns Phaser.Rectangle - Sou

Rectangle#y

y : number The y coordinate of the top-left corner of the Rectangle. Source code: geom/Rectangle.js (Line 33)

Rectangle#x

x : number The x coordinate of the top-left corner of the Rectangle. Source code: geom/Rectangle.js (Line 28)

Rectangle#width

width : number The width of the Rectangle. This value should never be set to a negative. Source code: geom/Rectangle.js (Line 38)