Sure thing, it splits the space (in my case, the cube defined by boxSize) into smaller 3D cells. Then each particle (per animation frame) is stored in one of those cells. When checking for possible collisions, you only look within its respective cell instead of the all the space.
The “hash” means taking the position.x,y,z and performing some “hash” operation on them to form a single “key” value. this “key” is then used to cluster the objects in a map.
The hash function for sorting an object into a 2d grid might be:
let position = object.position;
let hashKey = ((position.x/gridCellSize)|0)+(((position.y/gridCellSize)|0)*gridWidth);
let cell = hashMap[ hashKey ];
if (cell) cell.push( object );
else hashMap[ hashKey] = [object]