Examples with source beside the renderer.
39 pages across 11 groups. Each page keeps the code, canvas behavior, and renderer tradeoff in one place.
Getting Started
Focused cases for one renderer path.
3 pages
Geometry
Focused cases for one renderer path.
4 pages
Materials
Focused cases for one renderer path.
4 pages
Material Types
Three spheres showing BasicMaterial, LambertMaterial, and ToonMaterial side by side.
Toon Shading
Four ToonMaterial spheres with different colors showing cel/stepped shading.
Flat vs Gouraud
Two spheres: flat shading (one color per face) vs Gouraud shading (per-vertex, interpolated).
Points Material
Point rendering mode with adjustable point radius.
Lights
Focused cases for one renderer path.
3 pages
Camera
Focused cases for one renderer path.
2 pages
Scene Graph
Focused cases for one renderer path.
2 pages
Animation
Focused cases for one renderer path.
3 pages
Animation Basics
Manual position/rotation/scale animation driven by Clock.delta - no keyframes needed.
Keyframe Animation
AnimationClip with VectorTracks drives position and scale. action.timeScale controls playback speed.
Animation Blending
Two clips on the same Animator: crossFadeFrom switches smoothly between Bounce and Spin.
Textures
Focused cases for one renderer path.
4 pages
Interactive
Focused cases for one renderer path.
2 pages
Helpers
Focused cases for one renderer path.
1 pages
Performance
Focused cases for one renderer path.
11 pages
Render Benchmark Suite
Deterministic browser benchmark suite with warmup, repeated samples, p50/p95 FPS and frame-time stats, pipeline timings, workload counters, and JSON export.
Mesh Grid Workload
Configurable mesh grid to stress traversal, fog, sorting, and texture sampling.
Sphere Raster Workload
Sphere with adjustable subdivisions and material modes to isolate rasterizer throughput.
Frustum Culling Workload
Large grid of objects with camera aimed at one corner to measure frustum culling effectiveness.
Multi-Light Workload
Measure lighting cost by adjusting the number of point lights in the scene.
Point Cloud Workload
Measures PointRasterizer throughput with large vertex counts.
Overdraw Workload
Overlapping translucent planes to measure overdraw and transparency cost.
Scene Hierarchy Depth
Deep nested scene graph to measure matrix propagation cost.
Resolution Scaling Workload
Measure how rendering cost scales with canvas resolution.
Voxel Chunk Workload
Voxel chunks measuring geometry merging vs individual meshes.
Mixed Complexity Scene
Heterogeneous scene with varied geometry, materials, and shading modes.