Just converted a p5js sketch I had called “Bouncing Colorful Balls” to PyScript:
https://PyScript.com/@gotoloop/bouncing-colorful-balls
The original p5*js sketch had 2 versions:
And I made 2 versions for PyScript:
- Imports the original “ball.mjs” as a JS module.
- Imports its own converted “ball.py” Python module.
Besides those HTML files, “index.html” shows all 4 of them.
While “all.html” shows 4 p5*js sketches, 2 global & 2 instance mode versions.
Those 4 sketches teach many techniques on how to write/convert p5*js sketches to PyScript syntax.