2.0.8 • Published 4 years ago
@olton/animationjs v2.0.8
AnimationJS - Animate HTML elements
AnimationJS is a javascript class designed to animate html elements.
Contributing
Clone repository / Get source
git clone https://github.com/olton/animationjs
Install dependencies
npm i
yarn add
Run tests
yarn test
npm test
Install
With npm
npm install @olton/animationjs --save-dev
With yarn
yarn add --dev @olton/animationjs
Using
Example
import {animate} from "../src";
const field = document.querySelector(".wrapper");
const w = field.clientWidth, h = field.clientHeight;
const ball = document.querySelector(".ball");
// Move ball left
animate({
el: ball,
draw: {
left: [0, w - ball.clientWidth]
},
dur: 2000,
ease: "easeOutQuad",
loop: true
});
// Drop ball down
animate({
el: ball,
draw: {
top: [0, h - ball.clientHeight]
},
dur: 2000,
ease: "easeOutBounce",
loop: true
});
// Rotate ball
animate({
el: ball,
draw: {
rotate: 360
},
dur: 1200,
loop: true
});
Documentation
You can find the documentation at this link.
License
This software is free to use under the MIT license. See the LICENSE file for license text and copyright information.
2.0.7
4 years ago
2.0.8
4 years ago
2.0.6
4 years ago
2.0.5
4 years ago
2.0.4
4 years ago
2.0.3
4 years ago
2.0.2
4 years ago
2.0.1
4 years ago
2.0.0
4 years ago
1.0.10
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.2
4 years ago
1.0.4
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago