스크롤 위치를 앞뒤로 움직이면 장면도 같은 비율로 진행하거나 되감긴다Moving the scroll position forward or backward advances or rewinds the scene at the same ratio.
스크롤 1200px 구간이 타임라인 progress 0~1에 대응하고 화면은 500ms 지연으로 부드럽게 따라온다
progress와 스크롤을 연결하지 않고 스크롤이 시작되면 자동 재생돼 되감기가 안 된다. 스크롤 구간이 300px라 너무 민감하다
기본값은 클립에 쓴 값Defaults are the values used in the clip
| 항목PARAM | 기본DEFAULT | 범위RANGE | 메모NOTE |
|---|---|---|---|
| 스크롤 구간 | 1200px | 800~2400px | progress 0~1 |
| 추종 지연 | 500ms | 200~800ms | scrub smoothing |
| 진행 범위 | 0~1 | 0에서 1까지 선형 | |
| 이징 | none | 타임라인 안쪽에서 ease-out 허용 |
// ScrollTrigger 없이 코어만: 스크롤 값을 progress로 변환
let target = 0, cur = 0;
addEventListener('scroll', () => target = Math.min(1, scrollY / 1200));
gsap.ticker.add(() => { cur += (target - cur) * 0.12; tl.progress(cur); });그대로 붙여 넣는다Paste as is
<대상> 타임라인을 스크롤로 스크럽하게 해줘. 스크롤 0~1200px를 progress 0~1에 대응시키고 GSAP ticker에서 cur += (target - cur) * 0.12로 부드럽게 따라가게 해. 타임라인은 paused이고 자동 재생은 없어야 해.
Make the timeline in <target> scrub with scroll. Map scroll 0 to 1200px to progress 0 to 1, and follow smoothly in the GSAP ticker with cur += (target - cur) * 0.12. The timeline is paused with no autoplay.
<파일>에 scroll scrub를 구현해. 스크롤 구간 1200px, 지연 계수 0.12, tl.progress(cur)만 호출한다. scrollY 0, 300, 600, 1200 시점에 캡처해 progress가 0, 0.25, 0.5, 1이고 되감을 때 같은 프레임이 나오는지 확인해.
Implement scroll scrub in <file>: 1200px scroll range, smoothing 0.12, only tl.progress(cur) is called. Capture at scrollY 0, 300, 600 and 1200 and verify progress is 0, 0.25, 0.5 and 1, and that rewinding yields identical frames.
HyperFrames · ReelForge · Scrolline
개념 출처와 라이선스. 구현은 이 레포에서 새로 씀Concept sources and licenses. Implementations are original to this repo