You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should consider an interface similar to the p5.js way of doing things. It would reduce friction if we could take an existing WEBGL sketch and change it to a WEBXR AR or VR sketch by doing something like this:
Yeah this makes sense. The reason that this wasn't done initially is that modifying p5 prototypes directly is not recommended in the library authoring guidelines for p5. That said, I believe we had to do this elsewhere so it wouldn't be the most extreme departure.
This keeps the createARCanvas type functionality still working, although there are now a few lines like p5.instance._incrementPreload(); in the __createButton that are not needed if the preload method is used for initialisation.
A future refactor could/should be done to better differentiate the two.
We should consider an interface similar to the p5.js way of doing things. It would reduce friction if we could take an existing WEBGL sketch and change it to a WEBXR AR or VR sketch by doing something like this:
instead of
The current p5.js implementation for reference:
It would have to add a parameter to consider starting the sketch automatically as well: #224
The text was updated successfully, but these errors were encountered: