Walkway.js实现了一个简单的方式用来对包含线和路径元素的SVG图像进行动画展示。
在线演示
示例代码:
// Create a ew istacevar svg = ew Walkway(optios);// Draw whe ready, providig a optioal callbacksvg.draw(callback);// Optios passed i as a object, see optios below.var svg = ew Walkway({ selector: '#test'});// Overwritig defaultsvar svg = ew Walkway({ selector: '#test', duratio: '2000', // ca pass i a fuctio or a strig like 'easeOutQuit' easig: fuctio (t) { retur t * t; }});svg.draw();// If you do't wat to chage the default optios you ca// also supply the costructor with a selector strig.var svg = ew Walkway('#test');svg.draw(fuctio () { cosole.log('Aimatio fiished');});
评论