We recently shipped Shopify Design. β¨β¨
Here's a technical breakdown of how I built it. π§΅
VIDEO
Three.js doesn't own the layout β CSS does.
Opted-in [data-layout] elements are batched-read (init + resize) and mapped to world space. Children are inferred from parent boxes when possible.
That same pass pulls computed styles and detects line breaks, so WebGL text wraps exactly the same. SDF keeps smaller text sharp at any scale.
Headlines go further: opentype.js extracts glyphs β each letter becomes its own extruded mesh with independent depth. WebGL syncs to native scroll.
DOM vs WebGL β
Opted-in [data-layout] elements are batched-read (init + resize) and mapped to world space. Children are inferred from parent boxes when possible.
That same pass pulls computed styles and detects line breaks, so WebGL text wraps exactly the same. SDF keeps smaller text sharp at any scale.
Headlines go further: opentype.js extracts glyphs β each letter becomes its own extruded mesh with independent depth. WebGL syncs to native scroll.
DOM vs WebGL β
VIDEO
Ortho to perspective in 16 floats. β¨β¨
In flat mode the camera uses orthographic projection β mirrors the DOM.β¨
On press-and-hold, all 16 matrix values lerp toward perspective with a cubic ease. Content lifts, FOV widens. One lerp gives a webpage depth.
In flat mode the camera uses orthographic projection β mirrors the DOM.β¨
On press-and-hold, all 16 matrix values lerp toward perspective with a cubic ease. Content lifts, FOV widens. One lerp gives a webpage depth.
VIDEO
Each photo is downsampled and split into 3β6 mesh planes by brightness β darks, mids, highlights.β¨
As you dive, they separate in depth. Block-noise βdata moshingβ displaces UVs per slice, while each color channel is sampled at slight offsets β creating the chromatic tearing through the image.
As you dive, they separate in depth. Block-noise βdata moshingβ displaces UVs per slice, while each color channel is sampled at slight offsets β creating the chromatic tearing through the image.
VIDEO
The dive is layered with shader-driven effects: RGB channel splitting tears through images, barrel warp bends the viewport, Voronoi cell noise pulses through the wireframe grid, and a particle field fills the space between.
VIDEO
VIDEO
VIDEO
VIDEO
The dive effect is driven by a post-process shader: edge detection + a noise-warped radial sweep + oscillating glow.
Noise octaves control the crackle (scaled per GPU tier).β¨
Additional passes layer in radial zoom blur, barrel distortion, and vignette β all synced to the transition.
Noise octaves control the crackle (scaled per GPU tier).β¨
Additional passes layer in radial zoom blur, barrel distortion, and vignette β all synced to the transition.
VIDEO
The reveal mask reuses the electric edge's shape to cut the canvas β transparent outside, WebGL inside. It's the final pass that pulls everything together, hiding any misalignment between DOM and 3D geometry right where the crackling edge sits.β¨
The effect isn't just aesthetic, it's structural.β¨β¨
Final result slowed down β
The effect isn't just aesthetic, it's structural.β¨β¨
Final result slowed down β
VIDEO



See it live and don't forget to take the π β shopify.design
Generated by Thread Navigator
Press β + S to quick-export
