⬆️ ⬇️

SVG.js is a worthy competitor to Raphaël

image



Good day, dear habrazhiteli. I want to share with you one great find on GitHub - SVG.js - easy manipulation and animation of SVG . I want to say about three things that have focused my attention on this library. The simplest and most important thing is that with the advent of retina displays, SVG becomes more popular, more needed than before. SVG.min.js weighs 34kb and 9kb in Gzip, which is several times smaller than Raphaël and that can be sacrificed for design and effects . The minified SVG.filter.js with a size of 3kb is an excellent cross-browser analogue for the webkit-filter property.





Convenient syntax:



var draw = SVG('canvas').size(300, 300) var rect = draw.rect(100, 100).attr({ fill: '#f06' }); rect.animate().move(150, 150); rect.animate({ ease: '<', delay: 1500 }).attr({ fill: '#f03' }); 


')

Functional:







Existing plugins







Browser Support:



Desktop:




Mobile phones






Many thanks to all for your attention.

Source: https://habr.com/ru/post/195184/



All Articles