Skip to content

Examples ​

The examples folder holds runnable worlds, one script per world. Each script opens a window. To record a video from a script that calls _common.launch, set RISE_MODE=record, and the script writes RISE_OUT when RISE_DURATION seconds of the world have passed:

bash
RISE_MODE=record RISE_OUT=boxes.mp4 RISE_DURATION=4 python examples/basic/boxes.py

Basic ​

ScriptWhat it shows
examples/basic/boxes.pyA shower of rigid and soft blocks settling into a pile.
examples/basic/bridge.pyA heavy rigid block dropping onto a long soft span and snapping it.
examples/basic/stack.pyA pyramid of voxelized cubes.
examples/basic/sheet.pyA 50 by 50 cloth draping over a bed of spheres.
examples/basic/rod.pyA soft column wound up by a cylinder motor.
examples/basic/freeze.pyTwenty boxes dropping while a freeze wave sweeps around a ring.
examples/basic/pause.pyA ring of boxes dropping, with a button that pauses the whole world.
examples/basic/transform.pyFour cubes of different physics kinds, kicked up by a key.
examples/basic/intersection.pyA ball you steer into a fixed cube's region.
examples/basic/camera.pyEvery camera channel at once, orbiting a cube.
examples/basic/camera_stereo.pyA stereo camera showing both eyes.
examples/basic/ray_sensor.pyA ray sensor used as a low-resolution camera, with every channel.
examples/basic/mcp.pyAn MCP server inside a running world, for an AI client to drive.
examples/basic/vr.pyA floor and one cube presented to an OpenXR headset.
examples/basic/vr2.pyOne person steers a ball at the desk while another watches in VR.

Creatures ​

ScriptWhat it shows
examples/creatures/ant.pyA spherical torso on four two-segment legs, with eight hinges.
examples/creatures/dog.pyA voxel dog with a leg-phase walking gait.
examples/creatures/quadruped.pyA hinged quadruped with a trotting gait.
examples/creatures/flexor.pyA muscle-actuated quadruped built from one voxel grid.

Imported robots ​

ScriptWhat it shows
examples/external/urdf_franka/main.pyA Panda arm imported from URDF with its inertials and texture.
examples/external/mjcf_ant/main.pyA MuJoCo ant model with its eight leg hinges driven.

Rendering ​

ScriptWhat it shows
examples/render/floor.pyEvery floor layout crossed with every surface style.
examples/render/materials.pyA row of solid cubes and a row of nested cubes across material modes.
examples/render/sky.pyThree world backgrounds over a mirror-smooth floor.
examples/physics_bench/optics/focal_position/main.pyOne reading of where a voxel convex lens brings light to a focus.

Games ​

ScriptWhat it shows
examples/game/maze.pyA ball you roll through a procedural maze to a goal.
examples/game/pinball.pyA levitated, steeply tilted voxel pinball table.

Larger worlds ​

ScriptWhat it shows
examples/lab/main.pyA procedurally generated underground research station with many small lamps.
examples/world/main.pyA voxel river valley with forest, stones and sky, which you can stand inside.
examples/remote/server.pyA falling-boxes world served over the network. Run examples/remote/client.py to watch it.
examples/create/Preview scripts for each generated tree, rock and cloud.