Boids!
This is a simple implementation of the Boids rules in HTML5. The rules are as follows:
These three rules are enough to simulate a flocking behavior.
They'll chase your mouse or finger if you click near them and drag.
All of the source code is within this html file, so feel free to check it out.