xxxxxxxxxx
56
function setup() {
createCanvas(500, 500);
background(205);
art = color(0);
b = color(0, 0, 255);
r = color(255, 0, 0);
g = color(0, 255, 0);
}
let r, g, b, l;
let nothing;
function draw() {
noStroke();
fill(0, 0, 255);
circle(30, 40, 15);
fill(255, 0, 0);
circle(50, 40, 15);
fill(255);
textSize(15);
text('1', 88,45);
fill(0, 255, 0);
circle(70, 40, 15);
if ( key== '1')
{
background(205);
noStroke();
fill(0, 0, 255);
circle(30, 40, 15);
fill(255, 0, 0);
circle(50, 40, 15);
fill(0, 255, 0);
circle(70, 40, 15);
fill(255);
textSize(15);
text('1', 88,45);
//remove whats on the canvas
}
else if (mouseIsPressed){
stroke(b);
strokeWeight(10);
line(mouseX, mouseY, pmouseX, pmouseY);
}
}