xxxxxxxxxx
26
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
for (let x = 0; x < 400; x = x + (width/20)) {
let col1 = random(0,255)
let col2 = random(0,255)
let col3 = random(0,255)
//noStroke();
//fill('white')
if (mouseX < x + 20 && mouseX > x) {
fill(col1, col2, col3);
}
else{
fill('white')
}
rect(x, 0, 200, 400);
}
/* if (mouseX < x + 20){
fill('white')
*/
}