freshfork / p5.EasyCam

A p5.js library for easy 3D camera control.
https://freshfork.github.io/p5.EasyCam
MIT License
137 stars 33 forks source link

Problem/fix for instance mode with p5 1.4.2 #20

Closed v-k- closed 2 years ago

v-k- commented 2 years ago

Hello.

When using the library in instance mode, it breaks withp5 1.4.2. I don't have the error here, but it complains that does not know the function camera.

The problem is at line 628 (no minified), somehow the reference to the p5 object (I believe should be _curCamera) is lost and p5's function camera() is not recognized. I fixed it in a local copy, using the hidden p5's variable _pInst instead of _curCamera, everything went fine that way. Although this fixes the issue, I believe it's probably not the right way to do it, hence not a pull request, just this issue message. Thanks for the excellent work. cheers Vicente

ps: I'm not with my computer right now, so I can't provide a MRE, but can do it later if you guys want. Sorry about that.

jwdunn1 commented 2 years ago

Thank you for using p5.EasyCam! Here is a sketch that demonstrates proper instance mode operation of EasyCam with the latest release of p5js (v1.4.2). Please check that you are running the latest version of EasyCam. The index.html of the sketch includes the latest version by way of referring directly to the repo, or it can be included from the CDN link given in the readme.

v-k- commented 2 years ago

Man... thanks for your time. Actually I was using a previous release, not of EasyCam, but of p5js!!! Everything is fine with the correct version. Sorry, and thanks again.