Repository navigation
Open
Description
Figma: 5 LG hero states, MD 5691:35814, 5691:42665, SM 5615:22626
Steps
- Static LG/MD
scenes/hero/HeroScene.tsxinSceneFrame: stack every layer frommanifest.tsin z-order. The sky color is the CSS var--hero-sky; stars use<Starfield>with a density var. Each layer gets adata-animthat matches its manifest name. - Harness state preview:
/dev/scenes?scene=hero&state=<day|dusk|night|title|zoom>applies that state from the manifest statically, so each Figma state can be checked before animating. - Title block:
heroTitle"HACKBEANPOT" + "Brought to you by" + amazon/Maven logos. The MLH badge links out (target="_blank", alt text, per MLH's badge rules). - Scroll animation
hero.animation.ts(pinned,scrollLengthfrommotionSpec.ts), in 4 segments driven by the manifest:- 0 → 0.25 day → dusk: sky color, stars fade in, sun sinks and crossfades to the moon, a shooting star streaks once
- 0.25 → 0.5 dusk → night: sky to indigo, skyline blue → purple, more stars, MLH badge drops (
back.out), spotlight fixtures fade in - 0.5 → 0.75 night → title: near-black sky, title staggers up, moon → HBP moon, beams switch on (scaleY from the fixture + flicker), statue appears
- 0.75 → 1 zoom: title and badge fade early; the building group scales around the manifest's door origin until the door interior fills the screen, ending on a solid hero
exitColor(the handoff to About)
- Before any scroll: an idle day state (sun glow pulse, bushes sway 1–2°) + a scroll hint chevron that fades out once scrolling starts (ask Cole whether there's a design for it).
- MD uses the same timeline with the manifest's MD overrides.
- SM static
mobile/MobileHero.tsx: the flattened SM export, full100svh, exactly the SM frame, no motion at all, room for the SM header. - Performance: static layers use
next/image priority;will-change: transformonly on the zoom group during the zoom; the starfield on its own layer. - Register the hero in
registry.ts(component + animation) andsceneMap.ts.
Acceptance criteria
- Harness
state=previews match all 5 LG states and the MD frames - Scrubbing to progress 0, 0.25, 0.5 and 0.75 matches states 1–4, and the end shows the exit color; reverse scrolling is clean
- 60fps through the zoom in Chrome and Safari on a 2020-era laptop
- SM hero matches
5615:22626from 320 to 639px with no animation; hero LCP < 2.5s on Fast 4G (LG and SM)
Metadata
Metadata
Assignees
Labels
No labels
Activity