Global mode versus instance mode for namespace isolation in multi-sketch pages
Multi-sketch page with shared global namespace The goal is to run multiple p5 sketches on the same page without accidental collisions between p5 functions, sketch variables, and third-party scripts. Global mode attaches p5 functions such as createCanvas and draw to the window object, offering terse syntax from early examples. Instance mode encapsulates the s