Getting keyword color up and running

This commit is contained in:
Casey Reas
2012-09-04 03:43:15 +00:00
parent 18843b6f64
commit 954ef88c79
11 changed files with 63 additions and 27 deletions
+4 -7
View File
@@ -11,26 +11,23 @@
float x;
float y;
float targetX, targetY;
float easing = 0.05;
void setup()
{
void setup() {
size(640, 360);
noStroke();
}
void draw()
{
void draw() {
background(51);
targetX = mouseX;
float targetX = mouseX;
float dx = targetX - x;
if(abs(dx) > 1) {
x += dx * easing;
}
targetY = mouseY;
float targetY = mouseY;
float dy = targetY - y;
if(abs(dy) > 1) {
y += dy * easing;