xxxxxxxxxx
20
// 10 columns
function setup() {
createCanvas(400, 400);
w = width / 10;
}
function draw() {
background(220);
for (let c = 0; c < width; c += 40) {
if (mouseX > x && mouseX < x + w) {
fill("red");
} else {
fill("white");
}
rect(x, 0, w, height)
}
}