Did you try the example form from the instance mode documentation? (untested)
const s = ( sketch ) => {
// ...
};
let myp5 = new p5(s);
Did you try the example form from the instance mode documentation? (untested)
const s = ( sketch ) => {
// ...
};
let myp5 = new p5(s);