xxxxxxxxxx
16
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
for (let x = 0; x < width; x += 20) {
if (mouseX > x && mouseX < x + 20) {
fill(map(x, 0, width, 0, 255), 80, 200);
} else {
fill("white");
}
rect(x, 0, 20, height);
}
}