xxxxxxxxxx
18
function setup() {
createCanvas(400, 400);
background(random(255), random(255), random(255))
}
function draw() {
r=map(mouseX, 0, width, 0, 255)
b=map(mouseY, 0, height, 255, 0)
g=map(mouseY, 255, height, 0, 0)
if (mouseIsPressed) {
fill(random(255), random(255), random(255));
background(random(255), random(255), random(255))
} else {
fill(random(r), random(b), random(g));
}
ellipse(mouseX, mouseY, (30), (30));
frameRate(5)
}