Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pxlrbt/animation
Vanilla js class for simple animations.
https://github.com/pxlrbt/animation
animation javascript js vanilla vanilla-javascript vanilla-js
Last synced: 8 days ago
JSON representation
Vanilla js class for simple animations.
- Host: GitHub
- URL: https://github.com/pxlrbt/animation
- Owner: pxlrbt
- Created: 2020-04-28T13:10:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-28T14:18:29.000Z (over 4 years ago)
- Last Synced: 2024-11-29T15:52:24.325Z (25 days ago)
- Topics: animation, javascript, js, vanilla, vanilla-javascript, vanilla-js
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Animation
Very simple vanilla js animation library.
## Installation
```js
npm install @pxlrbt/animation
```## Usage
```js
import { Animation, EasingFunctions } from '@pxlrbt/animation';let animation = new Animation();
animation.from(0).to(100).delay(5000).duration(600).easing(EasingFunctions.easeInEaseOut).step((step) => {
console.log('Current', step.current);
console.log('Progress', step.progress);
console.log('From', step.from);
console.log('To', step.to);
});animation.animate();
// or
await animation.animate()
console.log('Animation done');
```