Hi all,
I built p5forge, a small browser tool that converts Processing-style sketches to p5.js and runs them instantly.
The idea is simple:
- paste Processing-like code
- transpile to p5.js
- run and iterate fast in one UI
This is still best-effort and intentionally lightweight, but I want to make it genuinely useful for creative coding archives and teaching material.
Here is the demo
Here is the repo
Feedback and suggestions are welcome
Hi @Meiller and thanks for sharing!
For anyone interested to dig further into that topic, here are two related projects also worth knowing about:
- Processing.js: it’s unmaintained now, but it still runs a large fraction of older Processing sketches in the browser. Here’s an example of a recent processing.js sketch on openprocessing.org.
- Darren Kessner’s processing-p5-convert: parses the sketch code into an Abstract Syntax Tree (AST) and translates from that, which makes it more robust than a simple regex approach.
I’ve made another update. My project now includes a proper AST-based compiler. It supports many more language features, including enums, interfaces, and abstract classes.
I gave it another try, and it still seems to struggle with some simple Processing sketches, for example sketches using PShape throw:
Unknown type 'PShape'
A good benchmark would be to get the official Processing examples running: https://github.com/processing/processing-examples
By the way, are you targeting p5.js v1 or v2? Because there are some substantial differences between the two.
Now PShape works. The project is now based on p5.js v2. I have also significantly improved Java compatibility and the editor. The goal is to develop an almost complete implementation of Processing in the browser for educational purposes and rapid experimentation.