Simplest Javascript Animation
npm install jsanimationSimple Javascript Animation
* Super light( less than 100 lines of code, less than 2KB gzipped)
* Super fast
* Expansion in mind
$ npm install jsanimation -D
`
Simply import the module into your code and run:
`
import {slideInRight} from 'jsanimation';
slideInRight(el);
`Or, more
`
import {Animation, slideInRight} from 'jsanimation';
Animation.DURATION = 2000;
Animation.TIMING = 'Animation.timingFunctions.inOutExpo';
slideInRight(el);
`Or, to fully control your animation
`
mport {animate} from 'animations.js';animate(
1000, // DURATION
function(t) { return Math.pow(t, 1.675) } // timing function
function(pct) { el.style.opacity = pct } // draw function
).then(function() {
el.removeAttribute('style')
});
`For Developer
$3
* docs: github pages files
* To set github pages with this directory, follow github instruction
$3
` bash
install dependencies
npm install
serve with hot reload at localhost:8080
npm start
build for production with minification
npm run build
``