Hi I’m trying to create a library that extends p5. I want to add event handlers to the sketch. I tried to use _onmousedown event present in p5 prototype, but its giving me an errror. How can I achieve this?
I could just attach an event listener to document. But is there a more elegant way of doing this?