Examples
Run focused scenes, read their source, and resize the renderer from a phone-sized viewport to a desktop screen.
No matching examples. Clear the filters to browse all scenes.
canvas
36 examples
- Open example
geometry / colors
Three flat-shaded icosahedra with hue, saturation and red-to-yellow vertex color gradients and black wireframe overlays float above soft canvas-texture shadows while the camera follows the pointer.
- Open example
geometry / convex
A translucent convex hull built around the twenty vertices of a dodecahedron spins beside an axes helper, with the source vertices drawn as blue points and orbit controls for the camera.
- Open example
geometry / cube
A unit box textured with the wooden crate GIF tumbles slowly around its X and Y axes.
- Open example
interactive / buffergeometry
Five thousand randomly placed, vertex-colored triangles in one rotating Geometry are raycast every frame, and a white outline traces the triangle under the pointer.
- Open example
interactive / cubes
Two thousand randomly colored, rotated, and scaled Lambert cubes are raycast every frame while the camera slowly orbits, and the cube under the pointer turns red.
- Open example
interactive / cubes / ortho
Two thousand randomly colored, rotated, and scaled Lambert cubes are viewed through an orthographic camera that slowly orbits them, and the cube picked by an orthographic raycast under the pointer turns red.
- Open example
interactive / lines
Fifty randomly colored Line and LineSegments copies of one random walk, nested under a random parent transform, are raycast every frame so a red sphere marks the line under the pointer while the camera slowly orbits.
- Open example
interactive / raycasting / points
Three 12,800-point clouds (non-indexed, indexed, and indexed with a draw group) circle past the camera while the pointer raycasts them and drops shrinking red spheres at each hit.
- Open example
interactive / voxelpainter
Click the grid to stack textured orange voxels where a translucent red roll-over cube snaps to the picked face; Shift-click removes a voxel.
- Open example
loader / bvh
Parse a Biovision Hierarchy motion file with BVHLoader and play its skeleton animation through an Animator, drawn by a SkeletonHelper over a grid.
- Open example
loader / gcode
Parse 3D-printer G-code with GCodeLoader and draw extrusion and travel moves as colored line segments.
- Open example
loader / imagebitmap
Six cubes appear one by one over a rotating grid, three textured through ImageLoader with a red tint and three through ImageBitmapLoader.
- Open example
loader / nrrd
Load an NRRD scalar volume and show three orthogonal slices inside its bounding box, with index, threshold, and window sliders.
- Open example
loader / obj
Parse a Wavefront OBJ model with OBJLoader, light it from the camera with a point light, and orbit it with damping.
- Open example
loader / pcd
Load a Point Cloud Data file with PCDLoader, center it, and orbit around its colored points.
- Open example
loader / svg
Parse SVG files into ShapeGeometry fills and stroke meshes over a grid, with toggles for strokes, fills and wireframes.
- Open example
loader / texture / tga
Two lit crates side by side, textured with a greyscale and a color-mapped TGA image decoded by TGALoader, with orbit controls.
- Open example
loader / vox
Parse a MagicaVoxel monument with VOXLoader, light it with hemisphere and directional lights, and orbit it.
- Open example
loader / xyz
Parse an XYZ point-cloud helix with XYZLoader and spin it as a centered Points object.
- Open example
lod
Fly through 1000 wireframe icosahedra whose LOD objects swap between five detail levels by camera distance.
- Open example
materials / texture / canvas
Click and draw in the white box to paint a 2D canvas that textures a rotating cube through a CanvasTexture.
- Open example
materials / video / webcam
Click the canvas to stream the webcam onto 128 planes arranged on a sphere around the camera, then drag to look around.
- Open example
math / obb
One hundred rotating boxes test oriented bounding boxes against each other every frame, turning red on collision; click a box to pick it with an OBB ray test.
- Open example
math / orientation / transform
A cone turns toward a red target that jumps to a random point on a wireframe sphere every two seconds, using Quaternion.rotateTowards or an instant lookAt.
- Open example
morphtargets / sphere
A glTF sphere lit by red and green point lights spins while its blob morph target swings back and forth, with white point sprites following the morphed vertices.
- Open example
panorama / equirectangular
An equirectangular panorama mapped inside an inverted sphere; the view pans slowly, drag to look around and scroll to zoom.
- Open example
points / billboards
Ten thousand randomly placed point billboards cycle through hues in exponential fog while the camera follows the pointer.
- Open example
raycaster / sprite
Hover the pointer over rotated, offset, and nested sprites to pick them with a Raycaster.
- Open example
test / memory
Create, render, and dispose a new random wireframe sphere, material, and solid-color texture every frame to exercise resource cleanup.
- Open example
video / panorama / equirectangular
An animated equirectangular panorama is mapped onto the inside of an inverted sphere; drag to look around from its centre.
- Open example
buffergeometry
160,000 random non-indexed triangles with flat face normals and position-based vertex colors fill a fogged cube that tumbles under ambient and directional light.
- Open example
buffergeometry / drawrange
Up to 1,000 particles drift inside a rotating box and connect with fading line segments when they come close, using setDrawRange to draw only the live part of preallocated point and line buffers.
- Open example
buffergeometry / indexed
A 10x10 indexed grid Geometry with per-vertex normals and a red-green gradient over full blue tumbles under a hemisphere light, with a wireframe toggle.
- Open example
buffergeometry / lines / indexed
Four rows of Koch snowflake curves at four iteration depths, drawn as one indexed LineSegments geometry with random per-vertex colors, spinning around the view axis.
- Open example
buffergeometry / points
A cube of 500,000 points colored by their position tumbles in dark linear fog, drawn from one Geometry with position and color attributes.
- Open example
worker / offscreencanvas
One hundred fogged, matcap-shaded icosahedra orbit slowly, with a jank toggle that busy-loops the main thread to show the render loop stalling.
webaudio
1 example
- Open example
sandbox
Three flat-shaded spheres carry positional sound sources over a grid; click to start the audio, then walk with WASD and drag to look while each sphere glows with its sound's loudness.
misc
7 examples
- Open example
controls / map
Pan, rotate, and zoom a damped MapControls camera over a fogged city of 500 instanced flat-shaded boxes.
- Open example
controls / orbit
Orbit, zoom, and pan a damped OrbitControls camera over a fogged field of 500 instanced flat-shaded cones.
- Open example
controls / pointerlock
Click the canvas to lock the pointer, then walk with WASD or the arrow keys, jump with Space, and look around with the mouse over a field of 500 colored boxes.
- Open example
controls / trackball
Rotate, zoom, and pan TrackballControls through a fogged cloud of 500 instanced cones, with a switch between perspective and orthographic cameras.
- Open example
controls / transform
Drag the TransformControls gizmo to translate, rotate, or scale a textured crate; keys switch mode, space, snapping, camera, and gizmo size.
- Open example
exporter / gcode
Place a cube, cylinder, cone, sphere, or torus on a Z-up build plate and slice the selected mesh into G-code text.
- Open example
exporter / obj
Switch between a triangle, primitives, transformed objects, and a point cloud, then serialize the scene to Wavefront OBJ text with OBJExporter.