So, I am not the most experienced p5 user but I am trying to write a “Picking” library for a specific project of mine. In the picking library, I need to create a “buffer” which is basically a hidden canvas which the user can interact with.
I am basing a lot of my code of the original Picking library made by Nicolas Clavaud for Processing. After decompiling the .jar file I have found a few things which I am struggling to think of a way to implement in JS.
The original picking library has a “buffer” class, which is basically a replica of the canvas. This class extends P3D so that it can do this.
I have 2 questions regarding this. Primarily, how would I extend the WEBGL renderer (p5.RendererGL) with a new class? (or function since classes are different in .js)
My second question is a bit naive since I do not have much experience in .js but what is the equivalent of a public void?
Thanks guys
EDIT: here is the link to the decompiled .jar files from the original Picking lib