SVG 图片动画展示:Walkway.js
jopen
10年前
Walkway.js 提供一个简便的方式来对由线和路径元素组成的 SVG 图片进行动画展示。
示例:
// Create a new instance var svg = new Walkway(options); // Draw when ready, providing an optional callback svg.draw(callback); // Options passed in as an object, see options below. var svg = new Walkway({ selector: '#test'}); // Overwriting defaults var svg = new Walkway({ selector: '#test', duration: '2000', // can pass in a function or a string like 'easeOutQuint' easing: function (t) { return t * t; } }); svg.draw(); // If you don't want to change the default options you can // also supply the constructor with a selector string. var svg = new Walkway('#test'); svg.draw(function () { console.log('Animation finished'); });