This example requires a browser that supports the HTML5 <canvas> feature.

Each ball has its web worker. Web workers compute position, speed, collision and acceleration in parallel in real time. The example suffers from the fact that webworkers cannot share memory. So quite some data is pushed forth and back. Anyhow it serves as a demo of the concept.
Click canvas to restart.

Click to start.