2.0.8 • Published 6 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/animationjsInstall dependencies
npm iyarn addRun tests
yarn testnpm testInstall
With npm
npm install @olton/animationjs --save-devWith yarn
yarn add --dev @olton/animationjsUsing
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
6 years ago
2.0.8
6 years ago
2.0.6
6 years ago
2.0.5
6 years ago
2.0.4
6 years ago
2.0.3
6 years ago
2.0.2
6 years ago
2.0.1
6 years ago
2.0.0
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.2
6 years ago
1.0.4
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago