-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
registerMethod implementation needed for p5play compatibility! #20
Comments
I also noticed the |
I would also need anything added by p5.js addon libraries to exist in the global scope or in q5 instances, not (only) in a separate |
btw I really like your code style! Short and concise. I'm gonna go ahead and try making all the necessary improvements to q5xjs so that it can work with p5.play. If you like what I end up with you can add me as a contributor to this project, otherwise I will make my own repo for it. |
Here's my progress so far, I've made a lot of big upgrades! |
I added automatic global instance creation to q5.js so p5.js sketches could be fully compatible with q5.js without the user needing I did it by adding a variable to check if a global instance of Q5 has been created yet. function Q5(scope) {
if (scope == 'global') Q5._global = true; I put the following code at the end of the q5js file. It creates a new global Q5 instance after all scripts are loaded, if one hasn't been created by the user already. document.addEventListener('DOMContentLoaded', () => {
if (!Q5._global) new Q5('global');
}); I'll make a pull request with my changes soon. :) |
Check out my list of what's new in version 1.0 😄 https://github.com/quinton-ashley/q5.js#whats-new-in-version-10 |
There's a bug with |
Hi I think this library is really great but I noticed there's no
registerMethod
implementation. Lots of p5 libraries rely on this feature, including mine, p5.play!I think making q5 compatible with p5.play would be perfect because my library only needs the 2D p5 functions. p5js is bloated and I think my users would especially benefit from q5 on mobile.
Let me know if you're currently working on a
registerMethod
implementation. If not I will try doing it.The text was updated successfully, but these errors were encountered: