quatree implementation in javascript. I use the quadtree to optimize collision detection performance