JavaScript implementation of the Boids alogorithm