We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm adding a script element that points to processing.js, and adding it to the document's head. Then I'm creating a canvas that points to my sketch, and adding it to a div in the body. They seem to be added in the dom ok when I check inspect from a browser, but the sketch doesn't run. If I directly write those 2 elements inside the document, then it works fine, so I'm not sure if something's not evaluating, or evaluating out of order, and so on.
I should note that I am running this on a local server. I was able to get this to work easily with p5.js, but hoping I can get it for processing.js too because most of my 3d sketches uses it! I broke it down to a simple example so you can check my code below.