xxxxxxxxxx
function setup() {
createCanvas(400, 400);
}
function draw() {
background(20,2,40);
//circle one
noStroke();
fill(200,200,200);
ellipse(200,200,240,240);
noStroke();
fill(30,2,90);
arc(200, 200, 242, 242, 7.1, PI + QUARTER_PI, PIE);
// circle two (center)
noStroke();
fill(0,0,0);
ellipse(200,200,10,10);
// moon
noStroke()
fill(255);
ellipse(70,51,50);
noStroke();
fill(20,2,40);
ellipse(80,49,50)
// cloud one
noStroke();
fill(250,200,80)
ellipse(360,39,35,35)
noStroke();
fill(250,200,80);
ellipse(369,60,35,35)
noStroke();
fill(250,200,80);
ellipse(350,70,35,35);
noStroke();
fill(250,200,80);
ellipse(324,74,35,35);
noStroke();
fill(250,200,80);
ellipse(299,67,35,35);
noStroke();
fill(250,200,80);
ellipse(299,43,35,35);
noStroke();
fill(250,200,80);
ellipse(320,30,35,35);
noStroke();
fill(250,200,80);
ellipse(345,28,35,35);
noStroke();
fill(250,200,80);
ellipse(340,60,50,50);
noStroke();
fill(250,200,80);
ellipse(320,50,35,35);
// big clock hand
stroke(0);
strokeWeight(8)
line(200,200,200,130);
//small clock hand
stroke(0,0,0);
strokeWeight(8);
line(200,200,260,130);
//clock spoke 12
stroke(0);
strokeWeight(8)
line(200,83,200,106);
//clock spoke 3
stroke(0);
strokeWeight(8);
line(291,200,317,200);
//(from left to right)
//city building 1
fill(30,0,150);
noStroke()
rect(90,150,60,120,0,0,0,24);
//city building 2
fill(30,0,150);
noStroke()
rect(115,210,80,80,0,0,0,8);
//city building 3
fill(30,0,150);
noStroke();
rect(190,230,40,87,0,5,0,0);
//windows building 1
fill(250,200,80);
noStroke();
WindowA=rect(115,160, 10, 10);
fill(250,200,80);
noStroke();
WindowB=rect(115,180,10,10);
fill(250,200,80);
noStroke();
WindowC=rect(115,200,10,10);
//windows building 2
fill(250,200,80);
noStroke();
Window4=rect(130,220,10,10);
fill(250,200,80);
Window5=rect(130,240,10,10);
fill(250,200,80);
Window6=rect(130,260,10,10)
fill(250,200,80);
Window7=rect(150,220,10,10);
fill(250,200,80);
Window8=rect(150,240,10,10);
fill(250,200,80);
Window9=rect(150,260,10,10);
fill(250,200,80);
Window10=rect(170,220,10,10)
fill(250,200,80);
Window11=rect(170,240,10,10);
fill(250,200,80);
Window12=rect(170,260,10,10);
//windows building 3
fill(250,200,80);
noStroke();
Window1=rect(205,250,10,10);
fill(250,200,80);
noStroke();
Window2=rect(205,270,10,10);
fill(250,200,80);
noStroke();
Window3=rect(205,290,10,10);
function mousePressed(){
Window1 = fill(45);
Window2 = fill(45);
Window3 = fill(45);
Window4 = fill(45);
Window5 = fill(45);
Window6 = fill(45);
Window7 = fill(45);
Window8 = fill(45);
Window9 = fill(45);
Window10 = fill(45);
Window11= fill(45);
Window12= fill(45);
WindowA=fill(45);
WindowB=fill(45);
WindowC=fill(45);
// In a perfect world the windows would flick on and off... however i have been trying to get this this work for 5 hours now and i cant get it, however i did want to show what i was going for.
}
}