Monday, April 02, 2012

Random_test Delta

int i = 1; //declaring variable and initialising
void setup () {
  size(500,500);
    background (random(0,250),random(0,250),random(0,250));
}
void draw() {rect(random(0,500),random(0,500),random(0,50),random(0,50));  fill(random(0,255),random(0,255),random(0,255));strokeWeight(random(5));stroke(random(0,255),random(0,255),random(0,255));
if(i == 1){
rect(mouseX,mouseY,random(1,50),random(1,50));}
            }
void mousePressed() {
  if(i == 1) {i = 0;}else{i = 1;}
}
void keyPressed() {background(random(0,255),random(0,255),random(0,255));}

info info

submitted by: Lukasrygh
views: 35
You can press the mouse to start or stop placing squares, key press to wipe the screen

Tags:

comments comment

loading loading...

 

Add a comment: