new QuadTree(x, y, width, height, maxObjects, maxLevels, level)
bounds : Object Object that contains the quadtree bounds. Source code:
reset(x, y, width, height, maxObjects, maxLevels, level)
retrieve(source) → {array} Return all objects that could collide with the given Sprite or Rectangle
level : number The current level. Source code:
getIndex(rect) → {number} Determine which node the object belongs to. Parameters
maxLevels : number The maximum number of levels to break down to. Default
objects :array Array of quadtree children. Source code:
split() Split the node into 4 subnodes Source code:
populate(group) Populates this quadtree with the children of the given Group. In order to be added the child must exist and have a body
Page 1 of 2