✨ Visual Editor

close

palette Canvas & Background

Gradient:arrow_forward
Text Color:
135Β°

style Card Style

40px
16px

text_fields Typography

16px
Johnny Slack
@johnnycartelle
We recently shipped Shopify Design. 


Here's a technical breakdown of how I built it. 🧡
Video thumbnail
VIDEO
Johnny Slack
@johnnycartelle
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 ↓
Video thumbnail
VIDEO
Johnny Slack
@johnnycartelle
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.
Video thumbnail
VIDEO
Johnny Slack
@johnnycartelle
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.
Video thumbnail
VIDEO
Johnny Slack
@johnnycartelle
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 thumbnail
VIDEO
Video thumbnail
VIDEO
Video thumbnail
VIDEO
Video thumbnail
VIDEO
Johnny Slack
@johnnycartelle
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.
Video thumbnail
VIDEO
Johnny Slack
@johnnycartelle
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 ↓
Video thumbnail
VIDEO
Thread image
Thread image
Thread image
Johnny Slack
@johnnycartelle
See it live and don't forget to take the πŸ’Š β†’ shopify.design
Generated by Thread Navigator
100%
view_carousel Carousel Studio NEW
Press ⌘ + S to quick-export