xxxxxxxxxx
27
let columnWidth;
let columnHeight;
function setup() {
createCanvas(windowWidth, windowHeight);
columnWidth = width / 3;
columnHeight = height / 3;
colorMode(HSB, 360, 100, 100);
}
function draw() {
background(255);
for (let counter = 0; counter < 3; counter++) {
let x = counter * columnWidth;
let y = height / 4;
mouseOver1();
rect(x, y, columnWidth, columnHeight);
}
}
function mouseOver1() {
if (mouseX < columnWidth) {
fill(map(mouseY, 0, 741, 0, 360));
}
}