QuadTree#maxObjects

maxObjects : number The maximum number of objects per node. Default Value 10 Source code: math/QuadTree.js (Line 29)

QuadTree#maxLevels

maxLevels : number The maximum number of levels to break down to. Default Value 4 Source code: math/QuadTree.js (Line 35)

QuadTree#level

level : number The current level. Source code: math/QuadTree.js (Line 40)

QuadTree#insert()

insert(body) Insert the object into the node. If the node exceeds the capacity, it will split and add all objects to their corresponding subnodes. Parameters Name Type Description body Phaser.Physics.Arcade.Body | object The Body object to insert into the quadtree. Can be any object so long as it exposes x, y, right and bottom properties. Source code: math/QuadTree.js (Line 151)

QuadTree#getIndex()

getIndex(rect) → {number} Determine which node the object belongs to. Parameters Name Type Description rect Phaser.Rectangle | object The bounds in which to check. Returns number - index - Index of the subnode (0-3), or -1 if rect cannot completely fit within a subnode and is part of the parent node. Source code: math/QuadTree.js (Line 203)

QuadTree#clear()

clear() Clear the quadtree. Source code: math/QuadTree.js (Line 295)

QuadTree#bounds

bounds : Object Object that contains the quadtree bounds. Source code: math/QuadTree.js (Line 45)

Polygon#type

type : number The base object type. Source code: geom/Polygon.js (Line 55)

Polygon#toNumberArray()

toNumberArray(output) → {array} Export the points as an array of flat numbers, following the sequence [ x,y, x,y, x,y ] Parameters Name Type Argument Description output array <optional> The array to append the points to. If not specified a new array will be created. Returns array - The flattened array. Source code: geom/Polygon.js (Line 61)

Polygon#setTo()

setTo(points) → {Phaser.Polygon} Sets this Polygon to the given points. The points can be set from a variety of formats: An array of Point objects: [new Phaser.Point(x1, y1), ...] An array of objects with public x/y properties: [obj1, obj2, ...] An array of paired numbers that represent point coordinates: [x1,y1, x2,y2, ...] An array of arrays with two elements representing x/y coordinates: [[x1, y1], [x2, y2], ...] As separate Point arguments: setTo(new Phaser.Point(x1, y1), ...) As sep