Load three.js first
The script reads window.THREE. Load three before code.js. No GSAP needed; it measures the section's scroll itself, so native scroll and Lenis both work.
Pick a picture with strong shapes
The hero is cut into 157 rows of tiles (110 on small screens) and brightness becomes tile size, so bold light and dark areas read best: a bright subject on a dark ground. A portrait-shaped picture keeps the tile count sane. Transparent pixels (alpha under 0.08) get no tiles, so a cut-out on transparency gives a clean silhouette with halo tiles round its edge.
Build the atlas to the layout
The atlas is 2048 × 1920: 8 columns × 10 rows of 256 × 192 tiles, and the first 78 are used. Give a half-size copy (1024 × 960) as data-src-small for phones. Busy, colourful tiles make the richest cloud.
Give it room to scroll
The section is --tfl-length tall (600vh by default) with a sticky stage. Every scrolled px moves the camera data-au-speed units; the picture has broken apart after data-au-break units and the first card arrives at 420. Don't put it inside a parent with overflow: hidden.
Retheme with variables
--tfl-bg is the page, the fog far tiles sink into and the vignettes. --tfl-glow lights the cards. Both are read once at init.