We are about to switch to a new forum software. Until then we have removed the registration on this forum.
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?
Doesn't seem like you can. I would go with the .parent() method to pick a div to put it in. Unless you're okay with your specified canvas being #defaultCanvas.
AFAIK, p5.js always creates its own canvas. 8-|
Easiest thing we can do is to use parent() to move sketch's
<canvas>to some pre-defined