Three.js VR Examples (WebXR)
Three.js supports virtual reality through the WebXR Device API, so a scene can run in a headset straight from the browser. These demos cover the essentials of VR development: stereo rendering and lens distortion, hand tracking with gesture recognition, and teleportation along a parabolic arc for comfortable locomotion.
A virtual art gallery puts these together into a complete experience. Every demo also works on a normal screen with mouse and keyboard, so you can explore the techniques without a headset.
Most viewed in virtual reality
All virtual reality demos
4 DemosThree.js WebXR Hand Tracking (Gesture Recognition)
WebXR hand tracking with gesture recognition in Three.js, classifying open palm, fist, point, peace, thumbs up, rock and pinch from 25-joint hand skeletons measured live, using real XRHand joints in VR or an animated procedural hand on desktop.
Three.js WebXR VR Headset Preview (Stereo & Lens Distortion)
A WebXR VR session demo in Three.js that detects immersive-vr, immersive-ar and inline support, enters VR on supported headsets, and previews stereo rendering on desktop with adjustable IPD, barrel lens distortion and chromatic aberration.
Three.js VR Teleportation (Parabolic Arc Locomotion)
Comfortable VR locomotion in Three.js with a parabolic teleport arc ray-tested segment by segment, target validation by surface slope and blocked areas, blink fade, snap turning and rig-relative movement, using XR controllers or the mouse on desktop.
Three.js Virtual Art Gallery (WebXR Exhibition)
Walk a virtual art gallery in Three.js or in VR, with ten seeded generative canvases (flow fields, circle packing, Truchet tiles, phyllotaxis, Voronoi and more) in frames under picture spotlights, sculptures on plinths, museum labels and a guided tour.