Skip to content

Instantly share code, notes, and snippets.

@danielmahal
Created October 4, 2013 21:28
Show Gist options
  • Save danielmahal/6833070 to your computer and use it in GitHub Desktop.
Save danielmahal/6833070 to your computer and use it in GitHub Desktop.
float x = 0;
float y = 0;
void setup() {
size(500, 500);
}
void draw() {
background(0);
x += (mouseX - x) * 0.05;
y += (mouseY - y) * 0.05;
ellipse(x, y, 5, 5);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment