Three.js Performance and Optimization Examples

A fast three.js app is one that does less work per frame. These demos show the main optimisation techniques side by side with live statistics: InstancedMesh and BatchedMesh for drawing thousands of objects in a few draw calls, level of detail (LOD) for distant objects, and frustum culling for objects that are off screen.

You will also learn how texture compression saves GPU memory, how to dispose of geometries and materials to avoid leaks, and how GPGPU techniques move a million particles entirely on the graphics card. Each demo measures its own cost so you can see the difference each technique makes.

Most viewed in performance & optimization

All performance & optimization demos

8 Demos
BatchedMesh Opacity + Wireframe (r183) preview
Explore Demo →

BatchedMesh Opacity + Wireframe (r183)

Performance-focused Three.js `BatchedMesh` demo showing per-instance opacity animation via `setColorAt(Vector4)` and live wireframe mode toggling.

performance
Instancing vs BatchedMesh Benchmark (r183 roadmap) preview
Explore Demo →

Instancing vs BatchedMesh Benchmark (r183 roadmap)

Split-screen benchmark comparing `InstancedMesh` and `BatchedMesh` with synchronized animation, live update timings, and draw-call counters at high instance counts.

performance
Three.js Level of Detail (THREE.LOD Performance) preview
Explore Demo →

Three.js Level of Detail (THREE.LOD Performance)

Level-of-detail rendering in Three.js with 600 procedural asteroids, each a THREE.LOD with 20k / 1.3k / 80-triangle meshes, with colour-coded levels, distance and hysteresis tuning and live triangle and draw-call counts.

performance
Three.js Instancing Performance (100k Objects) preview
Explore Demo →

Three.js Instancing Performance (100k Objects)

Render up to 100,000 cubes in Three.js and compare individual meshes, InstancedMesh with CPU-updated matrices, and InstancedMesh animated entirely on the GPU from gl_InstanceID, with draw calls and render-time stats.

performance
Three.js Frustum Culling Visualizer preview
Explore Demo →

Three.js Frustum Culling Visualizer

See frustum culling at work in Three.js, with a top-down inset showing the camera frustum and objects coloured visible or culled, live draw-call and triangle counts, and toggles for culling and the far plane.

performance
Three.js Texture Memory & Compression Formats preview
Explore Demo →

Three.js Texture Memory & Compression Formats

Measure texture memory in Three.js across many unique textures in RGBA8, RGBA5551 and GPU-compressed BC1, with mipmaps on or off, resolution choices, a packed atlas mode, and upload time and GPU texture counts.

performance
Three.js Memory Management (dispose() and Leaks) preview
Explore Demo →

Three.js Memory Management (dispose() and Leaks)

Watch GPU memory in Three.js as scenes are created and torn down continuously, comparing proper dispose() of geometries, materials and textures with the common leak of only removing objects from the scene, charted from renderer.info.memory.

performance
Three.js GPU Particles (GPGPU, 1 Million Particles) preview
Explore Demo →

Three.js GPU Particles (GPGPU, 1 Million Particles)

Up to one million particles simulated entirely on the GPU in Three.js with GPUComputationRenderer, using position and velocity float textures, curl-noise flow, a moving attractor and lifetime respawn, drawn as additive points.

performance