I’ve found an old discussion saying that this is possible in processing but wasn’t possible in p5 (https://github.com/processing/p5.js/issues/906).
I also think I found a discussion saying that a patch for this had been submitted https://github.com/processing/p5.js/pull/1185.
However, when I try to create a mixed shape, all the vertex() statements are interpreted as curveVertex() statements. Any help is appreciated.
Thanks,
Adam