Skip to content

Instantly share code, notes, and snippets.

export class SpatialGrid {
private cellSize: number;
private cells: Map<string, Set<any>> = new Map();
private entityCells: Map<string, string> = new Map();
constructor(cellSize: number) {
this.cellSize = cellSize;
}
private _key(x: number, z: number): string {