Load GSAP and three.js first
The script reads window.gsap and window.THREE. Load both before code.js. Without them the photo shows as is.
Pick a photo with clear lights and darks
Dot density follows brightness, so a subject that stands out from a darker background prints best. Flat, mid-grey photos turn into an even field of dots.
Keep the subject near the top
The photo is cover-fitted and anchored to its top edge, so tall screens crop the bottom. The plain <img> uses the same crop.
Choose your two colours
--dln-dot colours the dots and --dln-bg the space between them (and the scrim behind any copy). Both are read once at init. Dark background with a bright dot reads best.
Copy is optional
It ships as the photo alone. To add copy, put <div class="dln_scrim" aria-hidden="true"></div> and a .dln_content holding .dln_eyebrow, .dln_title and .dln_button after the image (React: eyebrow, title, buttonLabel).
Size the dots and the lens
data-au-cell sets the dot cell in CSS pixels: 2–3 for fine print, 6–8 for a chunky poster. data-au-radius sets the lens size as a share of the hero's height.