animate-path
v1.0.4
Published
Simple path animation module
Readme
animate-path
Simple path animation module
Installation
npm i animate-pathUsage
import animatePath from 'animate-path';
animatePath({
duration: 1000,
points: [
{x: 0, y: 0},
{x: 5, y: 3},
{x: 0, y: 0},
],
}, ({x, y, deg}) => {
// Do something like
// element.setPosition(x, y, deg);
}).then(() => {
alert('It`s finalized!');
});Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
