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