Simple example of animating points objects in Javascript
using the canvas API
.
The points are generated with different movement speed and different size using the Math.Random()
method.
This code will make the points bounce back after exceeding the edges of the canvas with certain amount of space.
And we have also control over showing either the points moving or only the lines connecting them or both of them.
Live Preview