Sets the cell size (applied on next clear)
the new cell size
Clears the grid for the next frame
Adds a particle to the appropriate cell
the particle to insert
Queries particles within a range (Circle or Rectangle)
the array of particles within the range
Queries particles within a circular range
the center position of the circle
the circle radius
Optionalcheck: (particle: Particle) => boolean
optional callback to filter particles
optional output array to fill with results
the array of particles within the circle
Queries particles within a rectangular range
the top-left position of the rectangle
the rectangle size
Optionalcheck: (particle: Particle) => boolean
optional callback to filter particles
optional output array to fill with results
the array of particles within the rectangle
SpatialHashGrid for fast particle lookup