Files
sunny9898/task8/wk7/wk7_example1b/wk7_example1b.pde
louiscklaw 5637fbf94f update,
2025-02-01 02:07:58 +08:00

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);
}