KUTE.js原生 Javascript 動畫引擎
KUTE.js 是一個原生的 Javascript 動畫引擎,具有優(yōu)秀的性能和模塊化的代碼。 它提供了一大堆工具,以幫助你創(chuàng)建自定義動畫。
KUTE.js 為 Web 開發(fā)人員、設(shè)計師和動畫師提供最基本的功能,提供易于使用的方法來設(shè)置高性能、跨瀏覽器的動畫。
Demo 請查看此處。
基礎(chǔ)用法
//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評論
圖片
表情
