- Technique
- Scroll-routed horizontal gallery: a
translate3d track driven by the document's real scroll position, eight Canvas2D plates, and a raised-cosine arrival ladder
- What it does
-
Turns vertical scroll into lateral travel through an eight-bay
editorial sequence — a collection, a product journey, a case-study
corridor. The document is genuinely eight viewports tall, so the
browser's own scrollbar, keyboard paging and momentum all work
without a wheel handler. Bays arrive on a raised cosine and leave on
the same curve, and each bay's plate is drawn twice into the gallery
at two parallax rates for real depth.
- Live demo
-
Four look chips and five knobs in the dock, all of which change the
rendered plates in the same viewport. Hold stops the render
loop on the current frame. The eight jump buttons travel to a bay
by scrolling the document — they are shortcuts, and every bay is also
reachable by scrolling or by the rail.
—
- What it's good for
- Fashion and product journeys · lookbooks · exhibition microsites · any narrative that wants to feel like a runway rather than a page
- Combines with
- Real photography swapped in per bay · audio that scrubs with X · a cart that reads the current bay · the cinematic-scroll rig as the opening shot
- Complexity
- Advanced — one scalar of state, eight drawn plates, a two-rate parallax gallery, and a no-script stack as the base state rather than a fallback
- Performance
-
What is rendered: eight 2D canvases at up to 1.1 M pixels
each, redrawn only when the look changes, a CSS transform per frame,
and eight opacity writes. What degrades: the plates are
not repainted per frame — they are static compositions and
moving them is a compositor's job, not a painter's. On a browser with
no 2D context the page keeps its transform, its words and its
controls and simply loses the plates rather than going black.
—
HORIZONTAL WORLD · chapter 18 · single file · zero network requests after the document
render: Canvas2D plates · one scalar of state · no wheel handler, no preventDefault
no script and reduced motion: the same eight bays, stacked vertically, same palette