import megamu.shapetween.*; Tween ani; void setup(){ ani = new Tween(this, 2); } void draw(){ background(255); ellipse(ani.time()*width, ani.position()*height, 4, 4); } void mousePressed(){ ani.pause(); } void mouseReleased(){ ani.resume(); } void mouseDragged(){ ani.seek( norm(mouseX, 0, width) ); }
seek(time)