Rectangle#intersectsRaw()

intersectsRaw(left, right, top, bottom, tolerance) → {boolean} Determines whether the coordinates given intersects (overlaps) with this Rectangle. Parameters Name Type Description left number The x coordinate of the left of the area. right number The right coordinate of the area. top number The y coordinate of the area. bottom number The bottom coordinate of the area. tolerance number A tolerance value to allow for an intersection test with padding, default to 0 Returns boolean

Rectangle#intersects()

intersects(b) → {boolean} Determines whether this Rectangle and another given Rectangle intersect with each other.This method checks the x, y, width, and height properties of the two Rectangles. Parameters Name Type Description b Phaser.Rectangle The second Rectangle object. Returns boolean - A value of true if the specified object intersects with this Rectangle object; otherwise false. Source code: geom/Rectangle.js (Line 323)

Rectangle#intersection()

intersection(b, out) → {Phaser.Rectangle} If the Rectangle object specified in the toIntersect parameter intersects with this Rectangle object, returns the area of intersection as a Rectangle object. If the Rectangles do not intersect, this method returns an empty Rectangle object with its properties set to 0. Parameters Name Type Description b Phaser.Rectangle The second Rectangle object. out Phaser.Rectangle Optional Rectangle object. If given the intersection values will be set into t

Rectangle#inflate()

inflate(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 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 the Rectangle. Returns Phaser.Rectangle - This Rectangle o

Rectangle#height

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

Rectangle#halfWidth

[readonly] halfWidth : number Half of the width of the Rectangle. Source code: geom/Rectangle.js (Line 452)

Rectangle#halfHeight

[readonly] halfHeight : number Half of the height of the Rectangle. Source code: geom/Rectangle.js (Line 465)

Rectangle#getPoint()

getPoint(position, out) → {Phaser.Point} Returns a point based on the given position constant, which can be one of: Phaser.TOP_LEFT, Phaser.TOP_CENTER, Phaser.TOP_RIGHT, Phaser.LEFT_CENTER,Phaser.CENTER, Phaser.RIGHT_CENTER, Phaser.BOTTOM_LEFT, Phaser.BOTTOM_CENTERand Phaser.BOTTOM_RIGHT. This method returns the same values as calling Rectangle.bottomLeft, etc, but thosecalls always create a new Point object, where-as this one allows you to use your own. Parameters Name Type Argument Descrip

Rectangle#floorAll()

floorAll() Runs Math.floor() on the x, y, width and height values of this Rectangle. Source code: geom/Rectangle.js (Line 150)

Rectangle#floor()

floor() Runs Math.floor() on both the x and y values of this Rectangle. Source code: geom/Rectangle.js (Line 139)