xxxxxxxxxx
// number of rects
int rectCount = 500;
//color change
int value = 0;
float [] rectX = new float [rectCount];
float [] rectY = new float [rectCount];
float [] rectA = new float [rectCount];
float [] rectB = new float [rectCount];
void setup() {
size (500, 500);
background (0);
}
void draw () {
background (0);
//rect
stroke(0);
for (int z = 0; z < rectCount; z = z + 1) {
fill ((int)random(255), (int)random(255), (int)random(255));
rect (rectX[z], rectY[z], rectA[z], rectB[z]);
rectX[z] = random (width);
rectY[z] = random (height);
rectA[z] = random (width-rectX[z]);
rectB[z] = random (150);
frameRate (30);
}
fill(value, value, 0);
stroke(255, 255, 0);
rect (120,200,250,100);
fill(255, 0, 157);
textSize(32);
text("offline", 200, 260);
}
void mouseMoved() {
value = value + 5;
if (value > 255) {
value = 0;
}
}