xxxxxxxxxx
33
let w;
let h;
let recs;
function setup() {
createCanvas(windowWidth, windowHeight);
background(225);
w = windowWidth;
h = windowHeight;
recs = 4;
drawRecs();
}
function drawRecs(){
rect(0, 0, w/recs, h);
rect(w/recs, 0, w/recs, h);
rect(w/recs*2, 0, w/recs, h);
rect(w/recs*3, 0, w/recs, h);
}
function windowResized(){
resizeCanvas(windowWidth, windowHeight);
w = windowWidth;
h = windowHeight;
drawRecs();
}