Build your first 3D world

Make a Rust 3D scene, step physics, and test live world focus.

Four steps from starter crate to live 3D scene1. Spawn entities: SceneWorld + PBR materials 2. Build BVH: Raycasts + frustum culling 3. Step physics: 60Hz joints +observer 4. Stream UORC: Portable GLB + UORC pack01Spawn entitiesSceneWorld + PBRmaterials02Build BVHRaycasts + frustumculling03Step physics60Hz joints+observer04Stream UORCPortable GLB +UORC packFour steps from starter crate to live 3D scene1. Spawn entities: SceneWorld + PBR materials 2. Build BVH: Raycasts + frustum culling 3. Step physics: 60Hz joints +observer 4. Stream UORC: Portable GLB + UORC pack01Spawn entitiesSceneWorld + PBR materials02Build BVHRaycasts + frustum culling03Step physics60Hz joints +observer04Stream UORCPortable GLB + UORC pack
Four steps from starter crate to live 3D scene. The starter project builds a scene world, constructs a BVH, steps 60Hz physics, and packs a UORC stream.
The data in this figure
StepWhat happens
1. Spawn entitiesSceneWorld + PBR materials
2. Build BVHRaycasts + frustum culling
3. Step physics60Hz joints +observer
4. Stream UORCPortable GLB + UORC pack

Run the starter template

The repository ships a runnable project in templates/browser-3d-starter so you can launch a 3D world right away.

cargo run --manifest-path templates/browser-3d-starter/Cargo.toml

That command builds verdant-core, validates all five built-in WGSL shaders, steps GJK triggers, and writes custom-starter-world.glb.

Spawn terrain and child beacons

Open templates/browser-3d-starter/src/main.rs to inspect how a scene world organizes parent and child 3D objects.

Spawn a root terrain patch first, attach columns as children, and build the bounding volume hierarchy.

let mut scene = SceneWorld::new();
let ground_id = scene.spawn("StarterTerrain", EntityRole::TerrainPatch, None, Transform::default(), bounds, (1.0, "Terrain"));
let bvh = scene.build_bvh();

Observe player attention with the live LIF loop

Test the integer-exact CyberneticObserverLoop right below by focusing different world slots in WebAssembly.

Live integer-exact LIF spike raster and entity salience scores computed by verdant-wasm.
Neuromorphic observer parameters
ParameterVerified boundRole
State neurons8 Q15 LIF unitsRecurrent membrane integration without float drift
Decay factor7 / 8 per tickBounded exponential leak across rollback frames
Mutual gimbal yaw-player_yaw_milliOrients the world observer toward the player

Capture a world snapshot and portable UORC stream

Encode a world snapshot and a portable four-LOD UORC stream with SHA-256 verification before exporting.

let snap_bytes = WorldSnapshot::encode(&lod_scene)?;
let restored = WorldSnapshot::decode(&snap_bytes)?;
let uorc_bytes = pack_portable_progressive_uorc_stream(7)?;
Words on this page 5
scene world
The entity-component-system container in verdant-core that stores entities, parent-child transforms, meshes, and PBR materials.
bounding volume hierarchy
A tree of 3D bounding boxes partitioned by surface area so raycasts, diegetic UI picks, and camera frustum checks skip distant geometry.
WGSL
The W3C portable shading language whose modules are parsed and type-checked in Verdant Engine by naga.
UORC
Universal Object Reference Compression: progressive SHA-256 chain-verified multi-frame compression streaming 3D scenes up to lossless resolution.
world snapshot
A deterministic binary save of tick count, streaming LOD rank, and entity transforms protected by a 32-byte SHA-256 digest.