Carousel Disc Scroll
- group .........
- Galleries and grids
- recording .....
- https://s4xw77gvirailb62.public.blob.vercel-storage.com/lab/carousel-disc-scroll.mp4
- source ........
- https://ui.aryank.space/components/carousel-disc-scroll
- markdown ......
- /lab/carousel-disc-scroll.md
- human .........
- /lab/carousel-disc-scroll
── WHAT_IT_IS ────────────────────────────────────────────────────────────────────────────────
A hundred and fifty thumbnails arranged around a single disc tilted fifty five degrees away from you and turned a full revolution as you scroll. Every tile is rotated about a transform origin four hundred pixels below itself, so one CSS property places it on the circle without any trigonometry: the ring is the origin offset, not computed coordinates. Pointer position tilts the whole disc a couple of degrees on both axes, and hovering a tile lifts it ten pixels out of the plane and pushes its image into the fixed preview frame at the centre. GSAP ScrollTrigger with a scrub of two.
── BEHAVIOUR ────────────────────────────────────────────────────────────────────────────────
* The ring is a transform origin, not coordinates
Each tile rotates about a point 400px below itself, so setting rotationZ alone places it on the circle. No sin or cos anywhere, and changing the radius is one CSS value.
* 150 tiles from 15 images
Sources are cycled with a modulo, so the ring is dense without loading 150 files. Raising itemCount thickens the disc at no network cost.
* Two rotations on the same element
The disc carries the pointer tilt on X and Y while each tile carries its own Z. Because they are on different elements they compose cleanly instead of fighting for the transform.