How i extends class in p5.js?

This is a Processing concept thingy! Our “Global Mode” approach is strange to JS world! :scream:

Basically, it auto instantiates, then dumps & binds the whole p5 class to the global scope, which allows us to access them all w/o using the dot . operator. :clown_face:

Yup! And that’s the standard way most apps do in the JS world! :smirk:

Correct. However, we still can have multiple p5 “global mode” instances by placing them all inside separate <iframe> tags, like I did below: :money_mouth_face:

Do you mean my “Class p5 Extended” hack example? :thinking:

B/c we have to pass our function sketch as its argument: new p5Plus(mySketch);
That sketch needs to be using the “instance mode” approach. :no_mouth:

1 Like