Animation for the Oxigen for Timisoara website.
npm install git+https://github.com/andreipfeiffer/oxigen-animation.git
or simply download it.
import * as oxigen_animation from "oxygen-animation";
Should be called when you want to initialize the package:
oxigen_animation.init({
// the container for the animation
element: document.querySelector("#animation-scene"),
total_necesar: 250000000,
});
oxigen_animation.update({
total_strans: 1100000,
donatori: 146,
});
// you can pass an object:
oxigen_animation.animate({
nume: "Andrei P.",
suma: 200,
});
// or an Array
oxigen_animation.animate([
{ nume: "Andrei", suma: 100 },
{ nume: "Pfeiffer", suma: 200 },
// ...
]);
// stops the loop animation
oxigen_animation.stop();
// start build system (TS compiler) in watch mode
npm run watch
Open /docs/index.html
in your browser, preferably with a Live Server.