// docs / Language
3D scenes
A WebGL engine nobody asked for, with shadows nobody needed.
vcwl
scene(label: "A clickable box", camera: vec3(0.0, 1.5, 5.0), orbit: true, shadows: true) {
light(kind: "ambient", intensity: 0.3)
light(position: vec3(3.0, 5.0, 4.0))
mesh(shape: "box", label: "Box", color: "#7cc4ff") {
on click {
hits += 1
}
}
group(spin: vec3(0.0, 90.0, 0.0)) {
mesh(shape: "torus", color: "#b6ff6c")
mesh(model: "models/duck.glb", label: "A duck", position: vec3(2.0, 0.0, 0.0))
}
}
→
Primitives, and OBJ and glTF models with PBR materials, textures and animations.
→
Directional and point-light shadows, translucency with depth peeling, an orbit camera.
→
Meshes are clickable and keyboard-reachable; spinning stops when the user prefers reduced motion.