animaze

0.0.5 • Public • Published

animaze

Supersmall animation library.

npm install --save animaze

import animaze from 'animaze';
// Tip: If you are not using webpack/node.js you can use UMD version:
// animaze/lib/animaze.umd.js
 
const animazeOpacity = () => animaze({
    tick: v => { myDiv.style.opacity = v; }, // v is varied from 0 to 1
                                             // during animation
});
 
const animazeScroll = () =>  animaze({
    tick: v => window.scrollTo(0, 200 * v),
    duration: 500, // default is 240
    ease: k => 0.5 * (1 - Math.cos(Math.PI * k)), // this is default one
});
 
animazeOpacity().then(animazeScroll); // animaze returns Promise
 

Readme

Keywords

Package Sidebar

Install

npm i animaze

Weekly Downloads

22

Version

0.0.5

License

ISC

Last publish

Collaborators

  • andykog