xxxxxxxxxx
function setup() {
createCanvas(1600, 900);
background(100);
rectMode(CORNERS);
strokeWeight(0);
fill("rgb(255,249,126)");
rect(200,100,1400,900);
fill("red");
rect(200,100,1400,350);
fill("rgb(255,251,173)");
rect(700,200,900,900);
triangle(700,200,800,125,900,200);
fill("white");
circle(800,250,100);
fill("black");
circle(800,250,15);
stroke("black");
strokeWeight(4);
line(800,250,760,240);
strokeWeight(1);
line(700,200,700,900);
line(900,200,900,900);
line(700,200,800,125);
line(800,125,900,200);
fill("lightblue");
rect(725,800,875,900);
line(800,800,800,900);
fill("blue");
function drawWindows(x,y,c) {
let i = 0;
while (i < c) {
rect(x,y,x+75,y+50);
x+=85; // the 75 across the window itself is, plus the 10 so its not touching together
i++;
}
}
drawWindows(240,360,5);
drawWindows(940,360,5);
drawWindows(240,440,5);
drawWindows(940,440,5);
drawWindows(240,520,5);
drawWindows(940,520,5);
// rect(210,360,285,410); // +75 +50 to topleft xy
// rect(295,360,370,410); // +10 over, same ruleset as the window above
// rect(380,360,455,410); // ditto
}
// function draw() {
// circle(mouseX, mouseY, 20);
// }