Tactween
A simple core-based tweening to create animations
Install
CDN: coming soon
Download:
- releases: HERE
- bower:
bower install tactween
- npm:
npm install tactween
Usage
Include tactween.js
into your page:
And let's animate anything!
// from 0 to 100
Reference
tactween(props, options);
props
- is an (number, array, object) the value(s) you want to animate.options
- is an object to setup the animation.duration
- is in milliseconds (default:1000
)timing
- is an function to describe how to intermediate values calculated (default:(fraction) => { return fraction }
}before
- (optional) is called before animation startchange
- (optional) is called at every changecomplete
- (optional) is the completion
Examples
Properties
// Number; // Array may comprise only two elements; // Object;
Timing
// Linear; // Quad; // Circ; // etc...