All examples By author By category About

nitaku

Snap SVG library

Testing the SVG load feature of the Snap SVG library. An SVG made with Inkscape or Adobe Illustrator can be easily imported, styled and animated.

In this example, a pair of gears is drawn with Inkscape. IDs are given to key elements of the drawing by using the source view, then the file is saved as SVG.

Snap is used to load the external SVG file into an SVG context defined inline in the HTML, then animated.