xxxxxxxxxx
function setup()
{
createCanvas(1000, 1000);
background (255);
fill(255, 0, 0);
noStroke();
}
function draw()
{
widthVariable = abs(mouseX-pmouseX);
heightVariable = abs(mouseY-pmouseY);
ellipse(mouseX, mouseY, widthVariable + heightVariable, heightVariable + widthVariable);
}
function keyPressed()
{
if (key == 'r')
{
fill(random(100, 255), 0, 0);
}
else if(key == 'g')
{
fill(0, random(100, 255), 0);
}
else if(key == 'b')
{
fill(0, 0, random(100, 255));
}
}