Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

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...

106,660 Aufrufe • vor 6 Monaten •via X (Twitter)

13 Kommentare

Profilbild von Johnny Slack
Johnny Slackvor 6 Monaten

We recently shipped Shopify Design. 

 Here's a technical breakdown of how I built it. 🧵

Profilbild von Johnny Slack
Johnny Slackvor 6 Monaten

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.

Profilbild von Johnny Slack
Johnny Slackvor 6 Monaten

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.

Profilbild von Johnny Slack
Johnny Slackvor 6 Monaten

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.

Profilbild von Johnny Slack
Johnny Slackvor 6 Monaten

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.

Profilbild von Johnny Slack
Johnny Slackvor 6 Monaten

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 ↓

Profilbild von Johnny Slack
Johnny Slackvor 6 Monaten

See it live and don't forget to take the 💊 →

Profilbild von symbols
symbolsvor 6 Monaten

Cute

Profilbild von Glauber
Glaubervor 6 Monaten

Inspiring and mind blowing - well done

Profilbild von Ste
Stevor 6 Monaten

is flash back?

Profilbild von fohyspek
fohyspekvor 6 Monaten

how do you opt in the data layout elements? i feel like u imply that the opt-in is hardcoded. if i wanted to generalise this idea as a library what do you think would be the optimal strategy to intelligently do the opt-in. im thinking heuristics

Profilbild von Carlito
Carlitovor 6 Monaten

This is absolutely insane!!

Profilbild von Dan Heywood
Dan Heywoodvor 6 Monaten

I’d love some sort of code demo on what this part specifically looks like. Sounds incredibly powerful to be able to create a layout normally and have it render inside three js

Ähnliche Videos