Frame Sequence Hero
- group .........
- Hero sections
- source ........
- https://ui.aryank.space/components/frame-sequence-hero
- markdown ......
- /lab/frame-sequence-hero.md
- human .........
- /lab/frame-sequence-hero
── WHAT_IT_IS ────────────────────────────────────────────────────────────────────────────────
A scroll-scrubbed video played as 207 individual frames on a canvas. Every frame is preloaded before the trigger is created, so scrubbing never lands on a blank canvas, and each draw recomputes its own cover fit so the sequence fills any aspect ratio without distortion. Over the same pin the nav fades in the first tenth, the headline recedes on Z and fades by a quarter, and the product shot flies in from a thousand pixels forward.
── BEHAVIOUR ────────────────────────────────────────────────────────────────────────────────
* Nothing runs until every frame is decoded
A countdown across all 207 loads gates the ScrollTrigger, and errors decrement it too. Scrubbing therefore cannot outrun the network and land on an empty canvas mid-sequence.
* Cover fit is recomputed per draw
Each render compares the frame's aspect to the canvas aspect and derives its own draw rect, so the sequence fills any container shape without stretching and needs no CSS object-fit.
* Frames finish before the pin does
Frame index maps to the first 90 percent of the pin, leaving the last stretch for the product shot to arrive after the footage has already settled.