Skip to content
Back to the lab

CSS sticky + clip-path window + WebGL2 dissolve

A window that opens onto the moss

Formerly the second and third sections of the home page, now only here. As you scroll, a window opens in the page and shows the moss rendered live behind it; of the two paper cards, one is below the canvas and one above it. After a hold, the next page covers it again with a dissolve.

Source · GitHub

Scroll down about three screens: a window opens in the page and shows the moss growing, it holds for a while, and then the next page's paper colour covers it again. Move the pointer inside the window: the two paper cards shift by different amounts.

What is pinned here is a window, so it uses CSS sticky and not ScrollTrigger's pin: a pin-spacer needs the page height to be measured while Lenis is smoothing it, and sticky needs no measuring. ScrollTrigger only provides progress. The section is 320svh tall: the first 42% is the entrance (the rounded clip-path window opens on outQuad and the scene scales from 1.16 to 1), then a hold, and from 62% the paper colour comes down from the top. Its edge uses the same threshold field as the noise dissolve study, except that here it draws the paper colour. There are two paper cards in the window. Card a has no z-index, so it is painted below the canvas and the trunk passes over the empty area at its lower right; card b has z-index 3 and is in front of the root. This ordering is only possible with a scene rendered live; a static picture cannot do it. The two cards are the same size and sit at 860 × 160 and 1237 × 482 on the stage's 1600 × 880 grid. In the pointer parallax they shift by different amounts, which shows the distance between them. Between the opening and the cover, the whole screen is moss; during that time body gets data-grove-immersed, and the header's paper-colour scrim is hidden.

Source

Source files on GitHub:

Back to the lab