Petal is a programming language for creative coding.
compiling petal…
code → canvas
every demo here is editable.
Hit </> source on any sketch to open its code and change it — the canvas recompiles and re-runs as you type. Click the canvas to fling in more balls.
compiling petal…
edit and it runs liveopen in playground →
live gallery
everything here is actually running.
Generative art, a playable game, a paint tool — each is a single Petal file compiled in your browser. Open the source on any of them.
compiling petal…
Starfield
3dgenerative
A 3D star projection with motion trails. Warp speed, ~30 lines.
open starfield →compiling petal…
compiling petal…
Paint
toolinteractive
A little paint program — palette, brush sizes, and a procedurally drawn mandala on first run.
open paint →