xxxxxxxxxx
//SPECIAL THANKS TO ANGELA, SHOBUN, AND JOE//
void setup() {
size(1280, 720);
background(30, 10, 60);
noStroke();
frameRate(12);
}
void draw() {
fill(30, 10, 60, 4); //Background fades over foreground, inspired by 'Fade Away' by Simon Greed
noStroke();
rect(0, 0, width, height);
float a = random(500,680); //Sets float range for traffic lights
float b = random(0,100); //Sets float range for skyscraper lights
float c = random(100,700); //Sets float range for skyscrapers
float d = random(1,300); //Sets flaot range for skyscraper width
//Buildings
fill(20,10,80, 100);
noStroke();
rect(random(width),c,d,random(height));
//Buildings 2
fill(20,10,100, 100);
noStroke();
rect(random(width),c,d,random(height));
//Constrains red lights to float range
fill(254,16,4); //Adds red traffic lights
strokeWeight(0.5);
stroke(119,3,4);
ellipse(random(width),a,5,5);
//Constrains yellow lights to float range
fill(237,210,15); //Adds yellow traffic lights
strokeWeight(0.5);
stroke(166,62,0);
ellipse(random(width),a,5,5);
//Constrains green lights to float range
fill(24,213,191); //Adds green traffic lights
strokeWeight(0.5);
stroke(0,87,69);
ellipse(random(width),a,5,5);
//Constrains red skyscraper lights to float range
fill(254,16,4);
strokeWeight(0.5);
stroke(119,3,4);
ellipse(random(width),b,5,5);
//Constrains white skyscraper lights to float range
fill(234,250,250);
strokeWeight(0.5);
stroke(75,225,255);
ellipse(random(width),b,5,5);
//Constrains blue skyscraper lights to float range
fill(1,67,249);
strokeWeight(0.5);
stroke(2,39,215);
ellipse(random(width),b,5,5);
if (mousePressed == true) { //Lighted windows
fill(255, 238, 139, 90);
noStroke();
rect(mouseX, mouseY, 10, 15);
}
}