py5coding / py5book

juypter book repo for py5
https://py5coding.org/
64 stars 10 forks source link

I want to run in a browser #75

Closed peter100u closed 1 year ago

peter100u commented 1 year ago

Can he run in a browser, and if not, is there a plan to support the web?

hx2A commented 1 year ago

Hello @peter100u . Can you elaborate on what you are looking to do?

py5 can run over the Internet using mybinder using the Launch Binder link on this repo's README.md file:

https://mybinder.org/v2/gh/py5coding/py5book/HEAD?urlpath=lab

I am currently investigating how to get py5 to work through Google colab. However, both of these involve a "server" in the cloud where py5 is actually running, even though you can interact with it through your browser. It isn't possible run py5 inside a browser like you can do with p5. Someday this might be possible, but that depends on large advances in technology that I have no control over.

If you are interested in using a version of Processing that runs in a browser, I recommend p5 (JavaScript). There is (was?) also a way to write Python code that gets translated to p5 called pyp5js, I believe, but I don't have much experience with it. @villares , your link to that project from the below link is not working. Is pyp5js no longer available?

https://abav.lugaralgum.com/Resources-for-teaching-programming/

villares commented 1 year ago

Cheers! I must have done something wrong I'll have to fix the link! Here it is: https://berinhard.github.io/pyp5js/pyodide/

peter100u commented 1 year ago

Thank you very much for your reply, because I am developing a creative program for students to write and run processing on mobile phones, currently supports Java, JS, but Python does not support yet, I found your project in technical research, but I am not sure if it is feasible This is my app download link, you can take a look, thanks for the support https://apps.apple.com/us/app/processing-p5-js-compiler/id1601799933

hx2A commented 1 year ago

You are welcome. If you want to run Python on a mobile phone, give Kivy a try. It isn't Processing but people have made fun games with that. It is a capable platform.

Good luck with your project!

peter100u commented 1 year ago

Thank you so much