Add depth and dimension to your UI with these JavaScript 3D effects. This collection features interactive elements, immersive transitions, and visually striking components that use CSS transforms, WebGL, and JavaScript-powered libraries to create compelling 3D experiences.
18 JavaScript 3D Effects
Cinematic Zoom Blur Image Gallery
demo & codeThis 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.
3D Interactive MacBook Model
demo & codeThis 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.
Matcap Instanced Disco Geometry
demo & codeThis 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.
Shattering Image Gallery Transition
demo & codeThis 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.
Infinite 3D Poster Scroll Wall
demo & codeThis 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.
Isometric 3D Bouncing Cube Animation
demo & codeThis is an Isometric 3D Bouncing Cube Animation. It utilizes the Zdog.js engine to render a pseudo-3D geometric scene onto a flat HTML Canvas. Its function is to provide an engaging, continuous background animation where a wandering cube paints a trail across a structural grid, adding depth and kinetic energy to otherwise static hero sections.
Interactive 3D Pricing Card Slider
demo & codeThis 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.
Interactive 3D Coverflow Gallery
demo & codeThis is an Interactive 3D Coverflow Gallery. It organizes visual media into a spatial environment. Its function is to replace flat grids with depth-based navigation, using mathematical inverse transformations to zoom into selected items seamlessly.
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.
3D Raymarching WebGL Animation: Little Eagle
A detailed procedural 3D eagle flying over a desert, rendered via raymarching. Features animated wings and legs, a math-generated environment (sky, sun, sand), and interactive camera rotation on mouse drag.
See the Pen 3D Raymarching WebGL Animation: Little Eagle.
Flipping Playing Cards
A mesmerizing 3D animation of cascading playing cards fetched dynamically from the Deck of Cards API via JavaScript.
See the Pen Flipping Playing Cards.
Cubes
An infinite, psychedelic flight through a field of glass cubes that refract light and respond to camera interaction, creating a deep immersion into a tumbling crystalline structure.
See the Pen Cubes.
Extreme Hover with HTML and CSS
A visually dynamic and impressive effect where hovering over a static image transforms it into a complex, 3D-like collage, showcasing the capabilities of CSS transitions and imperative loading control.
See the Pen Extreme Hover with HTML and CSS.
3D Sign Up Button with Spline and GSAP
A 3D scene from Spline is loaded using the Spline Runtime, and its objects are brought to life with programmatic animation in GSAP. This approach allows you to avoid low-level WebGL by using a powerful timeline to create complex interactive scenarios, with the code already containing stubs for finding and controlling objects.
See the Pen 3D Sign Up Button with Spline and GSAP.
Lighting Cubes Grid
This demo uses the ANGLE_instanced_arrays extension to efficiently animate a volumetric grid of cubes. See how a single regl command can handle complex transformations and lighting for every instance.
See the Pen Lighting Cubes Grid.