xxxxxxxxxx
25
function setup() {
createCanvas(400, 400);
}
function draw() {
fill(0);
noStroke();
drawdot(mouseX, mouseY);
clearbutton();
}
function drawdot(x,y){
ellipse(x,y,5);
}
function clearbutton(){
fill(255);
stroke(0);
ellipse(20,20,40);
if((mouseX>= 0 && mouseX <= 40) && (mouseY>= 0 && mouseY <= 40) && mouseIsPressed){
background(255);
}
fill(0);
}