160+ three.js Examples
three.js is the go-to library for rendering 3D graphics in the browser using WebGL. This collection of three.js examples includes interactive 3D models, lighting experiments, camera movement, and immersive scenes - perfect for learning how to bring 3D to the web.
Examples

Scroll-Driven Particle WebGL Image Matrix
An advanced scroll-driven WebGL experience powered by Three.js and GSAP. A fixed background canvas uses InstancedMesh to render nearly 50,000 distinct 3D cube particles, colored dynamically by extracting color values from an image mapped onto a hidden canvas. As the user scrolls down the page, the camera’s Z-axis position transitions, causing the scattered cubes to seamlessly converge into a photographic portrait. (Requires: three.js, gsap.js)
See the Pen Scroll-Driven Particle WebGL Image Matrix.

Glass Physics 3D Jigsaw Puzzle
An advanced WebGL jigsaw puzzle simulation featuring realistic glass-like pieces powered by Three.js and Cannon.js. Each puzzle shape combines extruded spline geometries with compound rigid-body collision shapes to precisely model the jigsaw tabs and gravity. It includes an interactive preview container styled with a complex SVG halftone dot filter that fades dynamically using CSS @property transitions. (Requires: three.js, cannon.js)
See the Pen Glass Physics 3D Jigsaw Puzzle.

Interactive 3D Baked Room Concept
Interactive 3D Baked Room Concept leverages Three.js to render a detailed, stylized isometric room. Instead of heavy real-time shadows, the design uses a baked texture mapping approach (bakedTexture, normalTexture, occlusionTexture) for highly optimized, realistic ambient occlusion. Standard OrbitControls allow smooth user navigation within restricted bounding limits, preventing camera clipping. (Requires: three.js)
See the Pen Interactive 3D Baked Room Concept.

Halloween 2.5D Parallax Shader
This is a Halloween 2.5D Parallax Shader. It utilizes Three.js and custom GLSL shaders to transform a flat 2D image into an interactive, volumetric scene with dynamic lighting, fog, and depth distortion. Its function is to provide a deeply immersive, narrative-driven hero section, elevating static artwork into an interactive spatial environment without requiring full 3D models. (Requires: three.js)
See the Pen Halloween 2.5D Parallax Shader.

3D WebGL Shape Matcher Game
This is a 3D WebGL Shape Matcher Game. It utilizes the Three.js library to render a fully functional, physics-driven puzzle game directly in the browser. Its function is to demonstrate complex state management, 3D raycasting, and sequential animation chaining without the overhead of a dedicated game engine like Unity. (Requires: three.js, tween.js)
See the Pen 3D WebGL Shape Matcher Game.

WebGL RGB Shift Image Card
This is a WebGL RGB Shift Image Card. It renders a high-resolution raster image onto a 3D geometric plane, applying dynamic visual distortions based on pointer intersection. Its function is to elevate standard portfolio grids or hero sections into highly tactile, immersive experiences, replacing standard CSS transitions with complex mathematical pixel manipulation. (Requires: Three.js, GSAP)
See the Pen WebGL RGB Shift Image Card.

Cinematic 3D Racing Pursuit Game
This is a Cinematic 3D Racing Pursuit Game. It renders an endless runner-style experience with high-speed lane switching, projectile combat, and dynamic obstacle generation. Its function is to demonstrate complex WebGL post-processing and real-time game loops inside the browser, transforming a static webpage into an interactive arcade environment. (Requires: three-js)
See the Pen Cinematic 3D Racing Pursuit Game.

Twisted Wave GLSL Image Gallery
This is a Twisted Wave GLSL Image Gallery. It’s a high-performance, full-screen WebGL experience that uses custom shaders to create sophisticated visual effects. Its function is to transform a standard image carousel into a cinematic journey with two distinct interactions: a localized sine-wave distortion on mouse hover and a global radial blur that intensifies with the speed of the scroll. (Requires: Three.js, GSAP, Locomotive Scroll, Maku.js, imagesLoaded)
See the Pen Twisted Wave GLSL Image Gallery.

Cinematic Zoom Blur Image Gallery
This is a Cinematic Zoom Blur Image Gallery. It utilizes custom GLSL fragment shaders and Three.js to create a high-fidelity transition between image textures. Its function is to provide an immersive navigational layer for visual portfolios, where spatial depth and radial blur replace standard linear crossfades. (Requires: Three.js, GSAP)
See the Pen Cinematic Zoom Blur Image Gallery.

3D Interactive MacBook Model
This is a 3D Interactive MacBook Model. It utilizes Three.js to load, texture, and animate a high-fidelity .glb model of a laptop. Its function is to create a premium, cinematic product showcase, replacing static hero images with a fully interactive WebGL scene that animates through a complex opening and booting-up sequence. (Requires: Three.js, GSAP, lil-gui)
See the Pen 3D Interactive MacBook Model.

Matcap Instanced Disco Geometry
This is a Matcap Instanced Disco Geometry demo. It renders multiple unique 3D geometries (Torus Knot, Icosahedron, Torus) using the WebGL Instanced Mesh technique. Instead of drawing individual planes for every mirror on the surface of the shape, it creates one InstancedMesh per object, mathematically orienting thousands of tiny reflective mirrors to mimic a faceted, crystal-like disco surface. (Requires: Three.js)
See the Pen Matcap Instanced Disco Geometry.

WebGL Generative Flower Cursor
This is a WebGL Generative Flower Cursor. It transforms the cursor into a botanical paintbrush, procedurally generating complex, blooming flower patterns across the screen in real-time. Its function is to provide an immersive, artistic interaction layer that allows users to “paint” generative digital gardens. (Requires: Three.js)
See the Pen WebGL Generative Flower Cursor.

Shattering Image Gallery Transition
This is a Shattering Image Gallery Transition. It utilizes the WebGL API via Three.js to deconstruct 2D images into a matrix of 3D particles. Its function is to replace standard fade or slide slideshows with a highly cinematic, physics-based explosion effect, transitioning between photographs by blowing the current image apart to reveal the next one underneath. (Requires: ThreeJS, GSAP)
See the Pen Shattering Image Gallery Transition.

Infinite 3D Poster Scroll Wall
This is an Infinite 3D Poster Scroll Wall. It constructs a dense, continuous grid of cinematic assets rendered entirely in WebGL. Its function is to provide a visually overwhelming, highly performant “hero” background that automatically fetches live data from an external API and perpetually scrolls along a tilted perspective plane. (Requires: ThreeJS)
See the Pen Infinite 3D Poster Scroll Wall.

Interactive 3D Pricing Card Slider
This is an Interactive 3D Pricing Card Slider. It integrates WebGL geometric renders into a standard product tier UI. Its function is to convert static pricing options into an engaging, tactile spatial experience. (Requires: three.js, swiper.js)
See the Pen Interactive 3D Pricing Card Slider.

Procedural 3D Endless Runner Game
This is a Procedural 3D Endless Runner Game. It utilizes Three.js to render a dynamically generated, infinite obstacle course. Its function is to deliver a complete, lane-based gameplay loop entirely within the browser. The environment and actors are constructed procedurally, eliminating external asset dependencies and ensuring instant execution. (Requires: three.js)
See the Pen Procedural 3D Endless Runner Game.

Interactive Spectral 3D Ghost Effect
This is an Interactive Spectral 3D Ghost Effect. It utilizes Three.js and custom GLSL shaders to render a dynamic, mouse-tracking entity with analog signal decay. Its function is to serve as an immersive focal point or an interactive background element. The effect effectively bridges direct user input with procedural visual storytelling. (Requires: three.js, tweakpane.js)
See the Pen Interactive Spectral 3D Ghost Effect.

Interactive 3D Workspace Diorama
We often treat web content as flat information, devoid of spatial context. This component creates a digital sanctuary. By combining soft, pre-calculated lighting with a constrained interactive camera, we invite the user to inhabit a space, not just view it. (Requires: three.js, gltf-loader, orbit-controls)
See the Pen Interactive 3D Workspace Diorama.

Isometric 3D Little Restaurant
Real-time rendering often demands too much power for too little soul. This component brings the warmth of a hand-crafted miniature to the browser. By leveraging baked textures, we achieve photorealistic lighting with the performance footprint of a simple image. It is not just a 3D model; it is a digital diorama that invites the user to inspect every corner with tactile orbit controls. (Requires: three.js, gltf-loader, orbit-controls)
See the Pen Isometric 3D Little Restaurant.

3D Glass Photo Lens
This 3D Glass Photo Lens creates a stunning, tactile digital object - a thick glass block that refracts user-uploaded photos. Built with Three.js, it simulates the physics of light (transmission, IOR, thickness) to produce high-fidelity glass renders directly in the browser. Users can change the lens shape (Heart, Square, Hexagon), adjust the glass tint, and even modify the environmental lighting to see how reflections dance across the beveled edges. (Requires: Three.js)
See the Pen 3D Glass Photo Lens.

Oculus II: Immersive 3D Weather Station
Oculus II redefines the weather dashboard by blending real-time data with a cinematic 3D environment. Unlike static weather apps, it uses Three.js to render a living scene - drifting clouds, falling rain, or twinkling stars - that reacts to the mouse cursor with a subtle parallax effect. The UI floats above this world using glassmorphism, creating a sense of depth and modernity while providing live weather metrics from the Open-Meteo API. (Requires: Three.js, GSAP, Lucide Icons)
See the Pen Oculus II: Immersive 3D Weather Station.

Neon 3D Tubes Cursor Trail
This Neon 3D Tubes Cursor Trail brings high-end motion graphics to the web browser. Using the power of WebGL and Three.js, it generates a serpentine trail of glowing 3D geometry that fluidly follows the user’s input. The effect features dynamic lighting that casts soft glows on the tubes, and it includes a built-in interaction where clicking the screen instantly randomizes the color palette, keeping the visual experience fresh. (Requires: threejs-components (External Lib))
See the Pen Neon 3D Tubes Cursor Trail.

Tearing Paper Photo Gallery
This Tearing Paper Photo Gallery is a technical marvel that simulates the physical act of ripping a photograph in half. Unlike simple 2D masking effects, this component uses WebGL (Three.js) to deform the geometry in 3D space. As the user drags downward, the “paper” mesh splits, rotates, and tears along a procedural edge, complete with lighting and shadow effects generated by custom shaders. (Requires: Three.js, GSAP)
See the Pen Tearing Paper Photo Gallery.

WebGL Voronoi Particle Transition
This WebGL Voronoi Particle Transition is a cutting-edge visual effect that reimagines the standard image slider. Instead of manipulating DOM elements or simple textures, it converts images into a massive system of particles (one for every pixel). During transitions, these particles are subjected to a mathematical storm driven by Voronoi diagrams, creating a liquid, swirling distortion effect that feels organic and computational. (Requires: Three.js, GSAP)
See the Pen WebGL Voronoi Particle Transition.

Interactive 3D Falling Leaves Shader
This Interactive 3D Falling Leaves Shader is a sophisticated WebGL demonstration built with Three.js that showcases efficient rendering of thousands of unique objects. By utilizing InstancedMesh and custom GLSL shaders, it creates a stylized autumn tree where leaves respond to wind, sway realistically, and “die” (fall off) either randomly or through user interaction via raycasting. (Requires: Three.js, ES Modules)
See the Pen Interactive 3D Falling Leaves Shader.

3D Room with Three.js
An interactive 3D room diorama powered by Three.js, utilizing a “baked lighting” technique where pre-rendered shadows and lights are applied via a single texture for high performance.
See the Pen 3D Room with Three.js.

Glitch Image Hover Effect with Shaders
A calm static image that, upon hover, jitters, splits into RGB channels in bands, and slowly zooms in, evoking a digital glitch or cyberpunk atmosphere.
See the Pen Glitch Image Hover Effect with Shaders.

Image Hover Effect with Shaders
An interactive “liquid” image distortion effect powered by Three.js and custom GLSL shaders.
See the Pen Image Hover Effect with Shaders.

On-Scroll Fire (Three.js + GSAP)
A stylized, “digital” flame that evolves over time but obediently transforms (fades or flares up, changes geometry) in response to user interaction (scrolling).
See the Pen On-Scroll Fire (Three.js + GSAP).

Three.js Gradient
A Low Poly 3D planet visualization built with Three.js, featuring three rotating layers: a solid core, a wireframe shell, and a floating particle cloud.
See the Pen Three.js Gradient.