xxxxxxxxxx
var value = 255;
function setup() {
createCanvas(1000, 800);
background(255, 0, 0);
noStroke();
var count=0;
for(var x=0; x<width; x+=50) {
for(var y=0; y<height; y+=50) {
count+=1;
fill(value);
circle(x+20,y+20,40);
}
}
}
function mousePressed() {
if (value == 0) {
value = 255;
} else {
value = 0;
}
}