xxxxxxxxxx
var thesize = 1; // GLOBAL VARIABLE
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
}
function draw() {
// var thesize = 1; // I REDECLARED THE VARIABLE AS A LOCAL VARIABLE AAAAAAAAAAAAGDGDHDHGADJGKL
ellipse(mouseX, mouseY, thesize, thesize);
thesize = thesize + 1; // make the size a wee bit bigger
}
function keyTyped() {
if(key=='c') {
background(100);
thesize = 1;
}
}