Saturday, March 06, 2010

field02

void setup() {
  size (800, 500);
  smooth();
  background(0);
}


int r = 0;
int g = 173;
int b = 238;


void draw() {
  noStroke();
  for (int i = 5; i >= 0; i = i-1) {
    fill(r+mouseX/2, g-mouseY/2, b-25*i);
    rect(0, i*100, width, 100);
  }
}

info info

submitted by: kim
views: 485
nice colors on mouse pos (mouseX & mouseY do only work on mousePress

Tags: mouse, position, stripe, field

comments comment

loading loading...

 

Add a comment: