xxxxxxxxxx
26
let drawing_on = false;
function setup() {
createCanvas(400, 400);
background(255, 255, 200);
}
function draw() {
//background(220);
noStroke();
fill(0, 0, 255);
console.log("drawing_on is: " + drawing_on)
if (mouseIsPressed) {
drawing_on = !drawing_on;
// make drawing_on the opposite of what it currently is, if drawing_on is true, then make set it to false, if it is false, set it to true
}
if (drawing_on == true) {
ellipse(mouseX, mouseY, 10, 10)
}
}