KUTE.js原生 Javascript 动画引擎
KUTE.js 是一个原生的 Javascript 动画引擎,具有优秀的性能和模块化的代码。 它提供了一大堆工具,以帮助你创建自定义动画。
KUTE.js 为 Web 开发人员、设计师和动画师提供最基本的功能,提供易于使用的方法来设置高性能、跨浏览器的动画。
Demo 请查看此处。
基础用法
//vanilla js
KUTE.fromTo('selector', fromValues, toValues, options).start();
//with jQuery plugin
$('selector').fromTo(fromValues, toValues, options).start();
高级用法
//vanilla js is always the coolest
KUTE.fromTo(el,
{ translate: 0, opacity: 1 }, // fromValues
{ translate: 150, opacity: 0 }, // toValues
// tween options object
{ duration: 500, delay: 0, easing : 'exponentialInOut', // basic options
// callbacks
start: functionOne, // run function when tween starts
complete: functionTwo, // run function when tween animation is finished
update: functionFour // run function while tween running
stop: functionFive // run function when tween stopped
pause: functionSix // run function when tween paused
resume: functionSeven // run function when resuming tween
}
).start(); // this is to start animation right away评论
