controls how many seconds this animation plays for
duration
Examples
const slider = $.makeSlider($.w/2,100,100);
slider.min=5;
slider.value=6;
slider.max=10;
const example = $.loadAnimation(
$.w/2,$.h/2,
"/images/anim1.png",
"/images/anim2.png",
"/images/anim3.png",
"/images/anim4.png",
"/images/anim5.png",
"/images/anim6.png"
);
example.duration = 5; //5 second total duration
$.use(update);
function update() {
slider.draw();
example.draw();
}