Animated circles - SVG
Based on a get started with canvas tutorial on CreativeBloq and some small adjustment. It is <100 lines of JavaScript.
Here the same, just implemented without canvas, using SVG instead. Looks the same.
Adjustments from Canvas to SVG
- Circles are not drawn every frame just moved
- data like speed and direction are kept in the svg-elements themselves
- Specifically moving position in javascript code, not useing any SVG-animation