dirtyTest toggle
simpleTest toggle
add an object to be culled side effect: adds object.spatialHashes to track existing hashes
object
add an array of objects to be culled
update the hashes and cull the items in the list
number of buckets in results
helper function to evaluate hash table
returns an array of buckets with >= minimum of objects in each bucket
array of buckets
helper function to evaluate the hash table
helper function to evaluate hash table
helper function to evaluate the hash table
gets quadrant bounds
insert object into the spatial hash automatically called from updateObject()
set all objects in hash to visible=false
get all neighbors that share the same hash as object
in the spatial hash
returns an array of objects contained within bounding box
bounding box to search
iterates through objects contained within bounding box stops iterating if the callback returns true
bounding box to search
returns an array of objects contained within bounding box with a callback on each non-culled object this function is different from queryCallback, which cancels the query when a callback returns true
bounding box to search
function to run for each non-culled object
remove an object added by add()
object
remove an array added by addContainer()
container
removes object from the hash table should be called when removing an object automatically called from updateObject()
Get stats
update the has of an object automatically called from updateObjects()
update the hashes for all objects automatically called from update() when skipUpdate=false
Generated using TypeDoc
creates a spatial-hash cull Note, options.dirtyTest defaults to false. To greatly improve performance set to true and set displayObject.dirty=true when the displayObject changes)