reset(x, y, width, height, maxObjects, maxLevels, level)
retrieve(source) → {array} Return all objects that could collide with the given Sprite or Rectangle
bounds : Object Object that contains the quadtree bounds. Source code:
new QuadTree(x, y, width, height, maxObjects, maxLevels, level)
getIndex(rect) → {number} Determine which node the object belongs to. Parameters
level : number The current level. Source code:
maxLevels : number The maximum number of levels to break down to. Default
insert(body) Insert the object into the node. If the node exceeds the capacity, it will split and add all objects to their corresponding
maxObjects : number The maximum number of objects per node. Default Value
objects :array Array of quadtree children. Source code:
Page 1 of 2