-
-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Hi, thanks for creating this.
I tried using Poline in P5, version 2.0.5, but it doesn't seem to work. I also tried to just import it "regularly", eg. something like:
let Poline;
async function setup() {
({Poline} = await import('https://unpkg.com/poline?module'))
}
But then I get an Error like this:
TypeError: P.prototype.registerMethod is not a function
Which is most likely because Poline detects P5, but wants to register itself the way it was done in P5 v1.
I think it might be worthwile to check the P5 version (p5.VERSION) and/or wrap the whole p5 initialisation in a try/catch block, so that Poline can still be imported/used as above. What do you think?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request