Author: | franciscop |
---|---|
Views Total: | 135 views |
Official Page: | Go to website |
Last Update: | May 18, 2019 |
License: | MIT |
Preview:

Description:
Ola is a small & performant animation library used for smoothly animating/updating inbetweening/interpolating numbers in real-time.
How to use it:
Install & import the Ola.
# NPM $ npm install ola --save
import Ola from "ola";
Or directly load the Ola from a CDN.
<script src="https://unpkg.com/ola"></script>
Create a new instance and specify the initial value and duration in milliseconds.
const instance = Ola(20, 1000); const instance = Ola({ angle: 180 }, 200); const instance = Ola({ x: 0, y: 0 }, 500); const instance = Ola([ 0, 0, 0, 0 ], 600);
Update the value.
instance.value = 50; instance.angle = 360; instance.set({ x: 100, y: 100 }); instance[1] = 30;
Get the value.
log(instance.value); log(instance.angle); log(instance.get("x")); log(instance[1]);
Changelog:
v1.1.0 (05/18/2019)
- Fixed looping arrays