PImage bg; int a; float x; float y; float targetX, targetY; float easing = 0.06; void setup() { size(400,400); frameRate(33); bg = loadImage("fishface.jpg"); } void draw() { background(bg); targetX = mouseX; float dx = mouseX - x; if(abs(dx) > 3) { x += dx * easing; } targetY = mouseY; float dy = mouseY - y; if(abs(dy) > 3) { y += dy * easing; } noStroke(); smooth(); fill(20,130,248,59); ellipse(x, y, 53, 53); fill(255, 255, 255, 39); ellipse(x, y, 44, 44); } { a = (a + 1)%(width+32); }