Skip to content
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

Skulpt runtime #192

Open
nickmcintyre opened this issue Oct 29, 2021 · 3 comments
Open

Skulpt runtime #192

nickmcintyre opened this issue Oct 29, 2021 · 3 comments

Comments

@nickmcintyre
Copy link

Hello! I've been working on a Skulpt wrapper for p5.js and wonder if it might be of interest as another runtime for pyp5js. Here's a repl that you can use to try it out.

We've modified p5.js a bit for use in our math classes (coordinate system, graphing, etc.) but the wrapper works fine without these mods.

@berinhard
Copy link
Owner

This probably relates with #179 too. It's possible that just adding a new skulpt mode in the templates dir and configuring the lib to accept it will do the job here and, probably, the same strategy can work for Jupyter too.

@nickmcintyre
Copy link
Author

Cool! I'll open a pull request when I have something working. One question to start re: Skulpt versions.

Our environment is based on a Skulpt fork that implements a very nice FFI -- no telling if / when the FFI will be merged into the main Skulpt project. I'm also revisiting an old pull request to add a p5 module to Skulpt using the same mechanism they used for Processing.js.

Do you have a preference between the approaches?

@berinhard
Copy link
Owner

I'm more a fan of a default version than a custom form form Skulpt. So, maybe this old PR can be a good point to work with.

Anyway, the beast approach for me would be a more similar to what we have with pyodide and transcrypt, that is:

  • A skulpt directory under the pyp5js/templates/ dir;
  • A skulpt index.html.template that should be used by pyp5js to generate the final index.js;
  • A target_sketch.js.template that should handle any JS specific binding between p5.js + skulpt IDE;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants