Unit 2 – LA 2 – 2.2
var r, g, b;
function setup() {
createCanvas(400, 200);
var r = 0;
var g = 0;
var b = 0;
noStroke();
background('#000000');
}
function draw() {
if (mouseIsPressed) {
r = random(0,255);
g = random(0,255);
b = random(0,255);
}
fill(r, g, b);
ellipse(mouseX, mouseY, 10, 10);
}