Demos for p5.mbt (MoonBit's port of p5.js): WEBGL scenes, shaders, particles, generative art and two short films.
| Demo | What it shows |
|---|---|
| asia | Five Thousand Years of Asia, a two-minute WEBGL film in 13 chapters, with lit 3D scenes and CJK captions |
| history | A Short History of Computation, a 104-second 2D film |
| galaxy | 12,000 stars as POINTS with per-vertex colors, orbit_control |
| lorenz | the Lorenz attractor as a 3D line colored by speed |
| orrery | lights, emissive/specular materials, generated textures, font-shader labels |
| terrain | noise terrain from triangle strips, fog added to p5's material shader with a hook |
| mandelbrot | a deep zoom in a custom fragment shader (create_shader, uniforms) |
| feedback | two framebuffers feeding each other for trails |
| boids | flocking: separation, alignment, cohesion; the mouse attracts |
| particles | text_to_points words made of springy particles |
| tree | a recursive tree swaying in Perlin-noise wind |
| chrome | image-based lighting and a 360° background (image_light, panorama) on metal spheres |
| type3d | extruded 3D letters from font outlines (text_to_model) |
| bumpy | bump and normal maps (bump_texture, normal_texture) generated in graphics buffers |
| swarm | GPU instancing: 8,000 boxes in one draw call (instances, gl_InstanceID in a shader hook) |
| ribbons | a custom per-vertex attribute (vertex_property) read by shader hooks |
| crt | a custom filter shader over a 2D sketch (create_filter_shader, filter_shader) |
| materials | an OBJ model with MTL materials, a texture and a normal map (load_model) |
| portals | clipping in WEBGL (begin_clip, end_clip, invert) |
| accessible | screen-reader descriptions and generated outputs (describe, text_output, grid_output) |
moon build --target js --release
python3 -m http.server 8765import {
"bobzhang/p5",
}
supported_targets = "js"
pkgtype(kind: "executable")Install
Download zipDemos for p5.mbt (MoonBit's port of p5.js): WEBGL scenes, shaders, particles, generative art and two short films.