xxxxxxxxxx
function setup() {
createCanvas (windowHeight, windowWidth);
background (255);
}
function draw() {
var a = random (20,255);
var b = 0;
if (keyIsPressed === true) {
b = random (20,255);
a = 0;
}
if (mouseIsPressed){
if (mouseButton == LEFT) {
fill (a, 0,b);
translate (mouseX,mouseY);
noStroke ();
rect (0,0,20,20+(a+b)/3);
}
}
}