I’m trying to create a sketch where after setup the canvas is only changed when the user adds some geometrical objects by pressing the mouse. So it seems inappropriate to me to even implement the draw() method. To my understanding, the proper way to achieve this would be like so:
void setup(){
size(400, 400);
background(0,0,0);
}
void mousePressed() {
ellipse(mouseX, mouseY, 10, 10);
}
What I’m trying to achieve with this is adding a circle to the canvas whenever the mouse is beeing pressed. Apparently my understanding is wrong, because nothing to that effect happens, and I’m left wondering what would be the right way to do it. I apologize for such a lack of understanding and such a basic question, but the introductory material only seems to address cases where the use of the draw() method seems appropriate. But as I’ve explained above, I don’t think this would be the right way to go about in this case.