cvcGL · WebAssembly examples

The libcvc scene-graph library, rendering live in your browser — VTK 9.5 cross-compiled to WebAssembly.

terrain_lab preview

terrain_lab

See what the L-system world generator produces: terrain coloured by its own per-cell MATERIAL (or risk / occupancy / height), trees, rocks and buildings grown from the built-in L-system recipes and placed on the surface, volumetric water filling the valleys and coast, and a drifting cloud slab. Tune the generator live — seed, species counts, tree generations, relief and water level — and watch the world rebuild. 100% procedural, nothing is downloaded.

Run it →
lsystem_forest preview

lsystem_forest

Fly over a procedural island: L-system trees swaying in the wind, a travelling-wave sea and a GPU ray-cast cloud volume, with shadow maps and a free orbit/fly camera. 100% procedural — nothing is downloaded.

Run it →
lsystem_forest_ari preview

lsystem_forest_ari

The lsystem_forest demo reborn in the Ariadne UI DSL: the heightfield island, its sand/grass/rock height bands, the sky-gradient background, the StageLighting rig and shadows are all declared in one .ari document on the reusable scene capabilities — no demo-specific C++. The procedural pieces that aren't declaratively expressible are custom scene-node types the host registers: the L-system trees (both the original conifer pine and a compact branchy species), the travelling-wave sea volume, and the drifting L-system + fBm cloud sky volume. The pines sway in the wind and the cloud casts a soft shadow on the ground. 100% procedural — nothing is downloaded.

Run it →
lsystem_coast preview

lsystem_coast

Sail a procedural coastline where a GPU FFT ocean rolls in: an FFT-synthesised wave spectrum evolved live on the GPU, an L-system shore, sky and sun, with a free orbit/fly camera. 100% procedural — nothing is downloaded.

Run it →
volren_bunny preview

volren_bunny

Two bunnies, two renderers: the classic mesh beside a signed-distance-field volume of the same bunny, raycast on the CPU by cvc::volren and composited into the scene with a per-pixel depth map — watch it occlude and be occluded as it spins. The SDF is computed live from the mesh at startup; the raycast image, its translucent shell and the raster resolution are all software, no GPU volume tricks.

Run it →
volren_bunny_ari preview

volren_bunny_ari

The same CPU-raycast bunny, rebuilt in the Ariadne UI DSL: the scene, lighting rig and raycast control panel are all declared in one .ari document — no demo-specific C++, just the generic host. The volume is computed live as the signed distance field of the embedded Stanford mesh via a single DSL source (source: { sdf: { mesh } }), and the controls are reusable .ari components shared with the other bunny demos.

Run it →
volslice_bunny preview

volslice_bunny

The classic view-aligned slice compositor from VolumeRover2, ported to cvc::volslice: the bunny's signed-distance volume windowed into a byte texture and colored by a 256-entry transfer function, hundreds of camera-facing slices blended back to front. Add up to nine bunnies — each is its own scene-graph volume node, depth-sorted per frame — and drive quality, near-plane peel, the value window and spacing-corrected opacity live in the panel.

Run it →
volslice_bunny_ari preview

volslice_bunny_ari

The slice-based bunny, rebuilt in the Ariadne UI DSL: scene, transfer function, lighting and the slice control panel declared in one .ari document, driven by the generic host — no demo-specific C++. The volume is the signed distance field of the embedded Stanford mesh (source: { sdf: { mesh } }), and the controls are reusable .ari components.

Run it →
nav_city_swarm preview

nav_city_swarm

800 vehicles cross a foggy city with no global plan — the GRL-SNAM reactive swarm on the cvc::nav runtime (no Python, no libtorch). Tune agents, fog and belief live, then Apply / Restart to watch shared belief beat private belief on the same city.

Run it →
nav_city_drive preview

nav_city_drive

The legible cousin of the swarm: a few dozen vehicles in colour-coded convoys thread real downtown Austin to six rally points with no global plan — pure local reaction on the cvc::nav runtime (no Python, no libtorch), driven by the published trained CoefMLP. Chase-cam onto a lead vehicle, drag a rally point to re-route a whole convoy live, and under fog watch each convoy's sensed corridor light up in its own colour. Switch belief between shared, grouped and private.

Run it →
nav_fog_ghost preview

nav_fog_ghost

Fog of war: a vehicle detours a phantom wall its stale map shows but reality lacks, then erases it cell by cell as its sensor clears the ground. Switch between three limited-belief scenarios — ghost, dynamic and traffic.

Run it →
bunny_shadow preview

bunny_shadow

The smallest scene that tests a renderer honestly: one known-good mesh on a ground plane under a StageLighting rig. Shadow-map artefacts have nowhere to hide here — acne, peter-panning and a shadow in the wrong place are all obvious on a single caster. Toggle shadows and the lighting panel to watch a tight spot cone spend its texels where a directional light would waste them.

Run it →