My quadtree implementation in javascript