README
controlAnimationJS
The simple can be simply incredible! An “original copy”, from @keyframe CSS, but with new features, light (14.3KB), elegant, powerful and with high performance.
Getting started
Download
Via npm
$ npm install controlAnimationjs --save
or manual download.
Usage
ES6 modules
import controlAnimation from 'controlAnimationJS/lib/controlAnimation.js';
CommonJS
const controlAnimation = require('controlAnimation');
File include
Link controlAnimation.min.js
in your HTML :
<script src="controlAnimation.min.js"></script>
Hello world
var element = document.createElement( "div" ),
myAnimationObject = controlAnimation.create();
element.append( document.createTextNode( "Hello world" ) );
document.body.append( element );
myAnimationObject.element = element;
myAnimationObject.iterations = Infinity;
myAnimationObject[ 0 ] = {
color: "#009",
fontSize: "40px",
};
myAnimationObject[ 100 ] = {
0: "rgb(0, 200, 150)",
};
controlAnimation.play( myAnimationObject );
Browser support
Firefox | Opera | Chrome | Edge | IE | Safari |
---|---|---|---|---|---|
3.6 * | 11.0 * | 26.0 * | * | 5.0 * | 5.1 * |
Google Chrome: It is possible that the library also supports older versions of this browser. | |||||
Website | Documentation | MIT License | © 2021 Diogo Neves.