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.
144 three.js Examples
3D Glass Photo Lens
demo & codeThis 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.
Oculus II: Immersive 3D Weather Station
demo & codeOculus 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.
Neon 3D Tubes Cursor Trail
demo & codeThis 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.
Tearing Paper Photo Gallery
demo & codeThis 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.
WebGL Voronoi Particle Transition
demo & codeThis 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.
Interactive 3D Falling Leaves Shader
demo & codeThis 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.
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.
GSAP ScrollSmoother and Three.js
An immersive scrolling experience blending smooth typography with a floating 3D particle field powered by Three.js. GSAP orchestrates the camera movement and dynamic text highlighting, creating a synchronized parallax journey.
See the Pen GSAP ScrollSmoother and Three.js.
Shaders Example #15
A highly specialized, GPU-accelerated image transition component built on Three.js.
See the Pen Shaders Example #15.
Shaders Example #17
A psychedelic, fluid transition between images where the picture spirals, stretches, and “melts” before morphing into the next one.
See the Pen Shaders Example #17.
WebGL Liquid Texture Loader
A visually striking WebGL texture transition that employs displacement maps and custom fragment shaders to achieve a fluid, liquid-like morphing effect. The logic synchronizes JavaScript state management with GSAP animations to seamlessly blend a sequence of images through coordinate distortion, suitable for creative loaders, slideshows, or interactive galleries.
See the Pen WebGL Liquid Texture Loader.
Christmas Diorama with Three.js
An advanced 3D scene that loads animated GLTF models and merges standard Three.js Materials with custom WebGL Shaders to achieve complex visual effects like fire and pulsating neon.
See the Pen Christmas Diorama with Three.js.
Three.js Diorama Scene
A 3D scene loading setup using Three.js and the GLTF format. The model utilizes a single baked texture, which is applied to all child meshes for rendering optimization.
See the Pen Three.js Diorama Scene.
Image Displacement with Three.js
A texture morphing effect with 3D rotation on hover, implemented using Three.js and shaders (GLSL). The fragment shader uses the snoise3 function (simplex noise) to create an organic mixing mask for blending two images.
See the Pen Image Displacement with Three.js.
3D Motion Graphics with Three.js
A demo showing how to create a marquee effect on a 3D cylinder using Three.js and the Threeasy wrapper library - the key feature is manipulating the texture through its repeat and rotation properties to simulate scrolling.
See the Pen 3D Motion Graphics with Three.js.
Animated Camera Along a Path with Three.js
A modern Three.js setup using importmap to work with modules without a bundler - plus custom post-processing passes to create speed and glow effects.
See the Pen Animated Camera Along a Path with Three.js.
SomaFM Music Player with Vue and Three.js
A Vue.js player that parses an audio stream using the Web Audio API and creates a reactive 3D visualization on the fly with Three.js.
See the Pen SomaFM Music Player with Vue and Three.js.
NightLight 3D Effect
Realistic 3D lighting and atmospheric bloom effect achieved using Three.js and advanced post-processing with UnrealBloomPass, where shaders are customized to selectively exclude objects from the glow.
See the Pen NightLight 3D Effect.
Infinite Scrollable and Draggable WebGL Grid
This demo showcases advanced THREE.js implementation using coordinate wrapping and custom shaders to create a highly performant, infinitely scrollable and draggable WebGL grid with motion-based visual feedback.
See the Pen Infinite Scrollable and Draggable WebGL Grid.
Procedural Low Poly Planet with Three.js
A WebGL 3D scene where IcosahedronGeometry is transformed into a unique planet using Simplex noise, featuring dynamic land/water distribution and interactive scaling of vegetation on hover.
See the Pen Procedural Low Poly Planet with Three.js.
WebGL Morphing Ball with Three.js and GSAP
A striking shader morphing implementation built on Three.js/WebGL, where smooth 3D sphere deformation is created by procedural noise in the vertex shader, with dynamics controlled via GSAP and uniform variables.
See the Pen WebGL Morphing Ball with Three.js and GSAP.
LUME Shiny 3D Image Grid (Webgl, Three.js)
A high-performance 3D gallery leveraging WebGL for rendering an interactive image grid with a reflective (shader) effect and realistic cursor-driven lighting, implemented atop LUME.
See the Pen LUME Shiny 3D Image Grid (Webgl, Three.js).
rgbKineticSlider (WebGL Transitions)
This dynamic slider utilizes a displacement map to render cinematic transitions, while finely tuned cursor momentum guarantees a smooth and highly responsive kinetic interaction across all devices.
See the Pen rgbKineticSlider (WebGL Transitions).
Animating WebGL Shaders with GSAP
Dynamic control over GPU effects, including 3D-deforming ripples (Vertex Shader) on click and animated reveal masks by smoothly driving shader uniforms with GSAP timelines.
Liquid Morphology Slideshow (Three.js/WebGL)
This is a WebGL-powered image slider utilizing custom fragment shaders to create complex transition effects, structured with a comprehensive JavaScript configuration object and Tweakpane integration for real-time control over numerous uniform parameters.
See the Pen Liquid Morphology Slideshow (Three.js/WebGL).
3D Cube Loop with Three.js
An isometric 3D scene built with Three.js utilizing an OrthographicCamera for a fixed, non-perspective view; it implements high-performance lighting with cast shadows.
See the Pen 3D Cube Loop with Three.js.
Loading Cube 3D Animation
An isometric 3D animation leveraging Three.js and an OrthographicCamera to create a fixed, “flat” perspective; the GSAP Timeline precisely controls the complex, repeating movement and rotation of the central cube.
See the Pen Loading Cube 3D Animation.
Infinite Draggable WebGL Slider
See how Three.js and custom Shaders (Vertex/Fragment) create a striking chromatic aberration and “liquid” distortion effect on images in a GSAP-controlled horizontal slider.
See the Pen Infinite Draggable WebGL Slider.
Liquid Effect Background
An efficient WebGL/Three.js dynamic background implementation using a ready-made component. The demo focuses on programmatic adjustment of PBR parameters (Metalness, Roughness) and disabling secondary effects (setRain(false)) for optimization.
See the Pen Liquid Effect Background.
3D Floating Books Composition with Three.js and GSAP
A dramatic 3D composition of floating books, built using Three.js for rendering and GSAP for complex, cyclical rotation animations of each object, complemented by minimal text with a blending effect.
See the Pen 3D Floating Books Composition with Three.js and GSAP.
Live Clouds with Three.js
An infinite cloud-flying effect built with Three.js, where thousands of individual planes are merged using BufferGeometryUtils.mergeGeometries for optimized, high-performance rendering.
See the Pen Live Clouds with Three.js.
3D Soldier Spirit Effect
The demo showcases how to create an interactive and atmospheric 3D world, employing complex lighting setups (directional, point lights), particle systems, and post-processing effects to achieve a cinematic visual style.
See the Pen 3D Soldier Spirit Effect.
Physically Accurate Material Editor
This demo is a powerful showcase of WebGL rendering based on physically correct material properties. The code demonstrates how to combine Three.js, custom GLSL shaders, and interactive controls, allowing a user to adjust parameters like dispersion and anisotropy in real-time and observe their effect on the 3D object’s light and color.
See the Pen Physically Accurate Material Editor.
Cinematic Glitch Slideshow
An interactive demo showcasing slide transitions via destructive digital effects. It uses WebGL shaders to create realistic VHS distortion, static, and pixelation.
See the Pen Cinematic Glitch Slideshow.
Liquid Gallery with 3D Image Hover
A stunning 3D gallery built with Three.js, where images come to life on hover. This demo showcases a custom GLSL shader for a unique “liquid” animation effect and integrates Fancybox for full-screen viewing.
See the Pen Liquid Gallery with 3D Image Hover.
Particle Teapot with Glow Effects
A spectacular procedural 3D model generation from points using shaders and textures to create a “twinkling” effect. The use of EffectComposer allows for layering multiple post-processing effects like Bloom and RGB Shift, enhancing the visual quality.
See the Pen Particle Teapot with Glow Effects.
Glass Refraction Text Effect with three.js
This demo showcases advanced framebuffer and shader work. The light refraction and chromatic aberration effect is achieved by rendering geometry to multiple textures.
See the Pen Glass Refraction Text Effect with three.js.
Interactive 3D Orrery with Three.js
This demo shows advanced Three.js techniques, including a custom rendering pipeline with post-processing effects like Unreal Bloom. The system’s core functionality relies on a central animation loop that manages and orchestrates multiple parallel effects and user interactions.
See the Pen Interactive 3D Orrery with Three.js.
Three.js Water and Particles
The core feature of this project is the generation of complex, procedural water and particle animations directly on the GPU. Using custom shaders gives full control over the visuals, while post-processing effects add depth and a cinematic feel, opening up endless possibilities for experimentation.
See the Pen Three.js Water and Particles.
Three.js TextGeometry
This Three.js demo showcases procedural 3D text deformation combined with a sophisticated post-processing pipeline. It layers an UnrealBloomPass with custom GLSL shaders for dynamic rust and glitch effects, all tweakable in real-time via dat.GUI.
See the Pen Three.js TextGeometry.
Three.js Particle Morphing Animation
Powered by Three.js and Anime.js, this demo showcases complex particle morphing between six different shapes with smooth, procedurally generated transitions and customizable color schemes.
See the Pen Three.js Particle Morphing Animation.
Wave and RGB Image Distortion with Shaders
See how vertex and fragment shaders in Three.js are used to create a “living image” effect that reacts to scrolling. The technical focus is on the deformation (uOffset) and RGB shift (uRGBShift) controlled via GSAP.
See the Pen Wave and RGB Image Distortion with Shaders.
3D Planet: An Interactive Three.js Scene
A lively demo showcasing the power of Three.js in creating interactive 3D scenes. Key features include raycasting for mouse tracking, GSAP camera animations, and a dynamic UI with CSS filters.
See the Pen 3D Planet: An Interactive Three.js Scene.
Three.js Fractal Glass Distortion
This 3D demo showcases advanced Three.js capabilities, using a custom displacement map shader to create a unique distortion effect. It’s technically notable for its seamless transition of camera control from user interaction back to an automated, scripted path.
See the Pen Three.js Fractal Glass Distortion.
Three.js Carousel with Shader Distortion
This demo is a showcase of cool animation with WebGL and Three.js, where smooth scrolling via Lenis combines with interesting visual effects like RGB shift and image deformation.
See the Pen Three.js Carousel with Shader Distortion.
Three.js Glass Effect with ShaderMaterial
A detailed Three.js shader glass effect with complex refraction, dispersion, and reflection, enhanced by post-processing and controllable via a real-time GUI.
See the Pen Three.js Glass Effect with ShaderMaterial.
Three.js with ShockWave Shader Effect
A powerful Three.js demo focused on post-processing effects, utilizing EffectComposer to chain a standard RenderPass with a custom ShockWave/Ripple ShaderPass and an UnrealBloomPass for stunning visuals.
See the Pen Three.js with ShockWave Shader Effect.
Three.js 3D Model Animation with GSAP ScrollTrigger
An immersive scroll animation built on GSAP (ScrollTrigger) and Three.js. Features include 3D model loading, volumetric lighting, and dynamic animation parameters that can be easily adjusted via a control panel.
See the Pen Three.js 3D Model Animation with GSAP ScrollTrigger.