Sketching on an existing canvas

To create a sketch in p5, we first create the canvas using function createCanvas(width, height); inside the setup()

Now, if I already have a canvas defined in my HTML having an id #myCanvas, How do I use it in my draw() function to create sketches. In other words, how can I make p5 understand that now it has to draw stuff in #myCanvas?


Sign In or Register to comment.