15 lines
214 B
Plaintext
15 lines
214 B
Plaintext
float x = 0, y = 0;
|
|
|
|
void setup() {
|
|
size(400, 400);
|
|
}
|
|
|
|
void draw() {
|
|
background(230);
|
|
|
|
// follow the mouse more naturally
|
|
x = lerp(x, mouseX, .1);
|
|
y = lerp(y, mouseY, .1);
|
|
|
|
ellipse(x, y, 30, 30);
|
|
} |