import megamu.shapetween.*; Tween ani; void setup(){ ani = new Tween(null, 2); ani.repeat(); ani.start(); } void draw(){ background(255); ani.tick(); ellipse(ani.time()*width, ani.position()*height, 4, 4); } void mouseDragged(){ Tween.timeScale = lerp( 0.1, 3, norm(mouseX, 0, width) ); }
Tween.timeScale