xxxxxxxxxx
52
// building with doors by Britney Moreno
var r,g,b
function setup() {
createCanvas(600, 400);
r= random(0,255);
g= random(0,255);
b= random(0,255);
}
function draw() {
background("rgb(146,161,228)");
for( var x = 10; x<= width; x +=150){
var y=50
fill("brown");
rect(x, y, 400,300);
// building
fill(r,g,b);
strokeWeight(3);
stroke(10);
rect(x+10,y +10,20,40);
rect(x+60,y +10,20,40);
rect(x+10,y+160,20,40);
rect(x+110,y+10,20,40)
rect(x+110,y+160,20,40)
rect(x+10,y +80,20,40);
rect(x+60,y+80,20,40);
rect(x+110,y+80,20,40);
// the windows
fill("rgb(94,80,80)");
rect(x+45,y+150,50,150)
// the doors
fill("black")
ellipse(x+54,y+220,10,5)
}
if( frameCount % 1 == 0){
r= random(0,255);
g= random(0,255);
b= random(0,255);
}
fill(r,g,b);
// the color changing on the windows
}