Pages

marți, 21 mai 2019

Show SVG with the anime javascript library.

First of all the anime javascript library can be found at the official webpage.
Start with the empty project on codepen.io website.
You need to add the javascript library into the editor by using the wheel icon of JS area:
https://cdnjs.cloudflare.com/ajax/libs/animejs/2.2.0/anime.min.js
You can add the SVG source code with the path and then this will be parsed by javascript script.
The CSS code is used to stylize the output.
For example, the size of the path can be used like this:
.anim path {
  stroke-width: 3;
}
Then use the source code from my example.
See the result of this source code:
See the Pen animejs_001 by Cătălin George Feștilă (@catafest) on CodePen.