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
As I was looking at how it would feel to have a sketch running on pyodide without the editor (here) I wonder if we could make many sketch instances work in single pyodide.
The text was updated successfully, but these errors were encountered:
@villares yes, we can. I think it's just a matter of:
Enabling the user to pass what is the HTML element id to place the skecth. Currently it uses only sketch-holder
Stop using window.instance to store the p5.js sketch object and change it to a Javascript object. Something like:
sketch_holder="sketch_holder"// this can be passed by users via argument or something like thatwindow.pyp5js_instances={sketch_holder: window.instance=p5.new(sketch_setup,sketch_holder)}
The only thing to have in mind is that this should also work for Transcrypt. And this is the thing that most frighten me about having n + 1 interpreters: making sure all features are available to all of them.
IMHO, although this feature is something interesting in terms of web, I don't know if it's going be enabled in pyp5js next. I feel that there are issues with more impacts that will come first such as #132, #125 and #124.
As I was looking at how it would feel to have a sketch running on pyodide without the editor (here) I wonder if we could make many sketch instances work in single pyodide.
The text was updated successfully, but these errors were encountered: