Instance mode creating two canvas

I am not a JavaScript expert, but as far as I know p5.js instance mode and scoping are synonymous – the reason it works is that your sketches are not defined in global scope, but instead in a defined scope.

Perhaps a person with a bit more p5.js experience like @GoToLoop could comment.

1 Like