스크롤이나 진행값에 맞춰 연속 이미지 또는 영상의 프레임이 앞뒤로 바뀐다.Map progress to an image or video frame, including reverse scrubbing.
120장을 미리 로드하고 진행률 0.5에서 60번째 이미지를 그린다.
이미지 로딩이 끝나기 전에 스크럽을 시작해 빈 프레임이 보인다.
기본값은 클립에 쓴 값Defaults are the values used in the clip
| 항목PARAM | 기본DEFAULT | 범위RANGE | 메모NOTE |
|---|---|---|---|
| 프레임 수 | 120 | 60~180 | 0부터 119까지 |
| 재현 지속 | 5000ms | 3000~8000ms | 영상 타임라인 기준 |
| 평활 지속 | 600ms | 200~800ms | 입력 변화 완화 |
| 스크롤 구간 | 2000px | 1200~3000px | 진행률 0~1 구간 |
const tl = gsap.timeline({paused:true}), s = {p:0};
const draw = ()=>{
const i = Math.round(Math.max(0,Math.min(1,s.p))*119);
ctx.clearRect(0,0,1920,1080); ctx.drawImage(frames[i],0,0,1920,1080);
};
draw();
tl.to(s, {p:1, duration:5, ease:'none', onUpdate:draw});그대로 붙여 넣는다Paste as is
<파일>의 <대상>에 프레임 스크럽를 적용해. Canvas에 진행률을 정수 프레임 인덱스로 변환해 선택한 이미지를 그리며 역방향 진행도 같은 방식으로 처리한다. 프레임 수 120; 재현 지속 5000ms; 평활 지속 600ms; 스크롤 구간 2000px. 이징은 none로 하고 GSAP 코어 paused 타임라인으로 역방향 seek도 같은 상태를 만들게 해.
Apply Frame Scrub to <target> in <file>. Preload 120 frames and map clamped progress to round(progress*119). Use a 5000ms timeline or a 2000px scroll range with 600ms input smoothing. Use none and a paused GSAP core timeline that produces identical states when seeking backward.
<파일>의 대상 장면에 프레임 스크럽를 적용해. Canvas에 진행률을 정수 프레임 인덱스로 변환해 선택한 이미지를 그리며 역방향 진행도 같은 방식으로 처리한다. 프레임 수 120; 재현 지속 5000ms; 평활 지속 600ms; 스크롤 구간 2000px. 이징은 none를 사용해. 0초·2.5초·5초 시점을 캡처하고 시작 상태, 중간 변화, 끝 상태가 정의와 일치하는지 확인해. 같은 시점을 역방향 seek해서도 같은 화면인지 검증해.
Apply Frame Scrub to the target scene in <file>. Preload 120 frames and map clamped progress to round(progress*119). Use a 5000ms timeline or a 2000px scroll range with 600ms input smoothing. Use none. Capture at 0, 2.5, and 5 seconds to verify the initial state, the defining intermediate change, and the final state. Seek backward to the same times and compare the images.
HyperFrames · ReelForge · Scrolline
개념 출처와 라이선스. 구현은 이 레포에서 새로 씀Concept sources and licenses. Implementations are original to this repo
gongnyang/awesome-html-scrolline-deck:references/techniques.md#frame-scrub-hero)MITgongnyang/awesome-html-scrolline-deck:templates/scenes/frame-scrub-hero/scene.css)MITgongnyang/awesome-html-scrolline-deck:templates/scenes/frame-scrub-hero/scene.html)MITgongnyang/awesome-html-scrolline-deck:templates/scenes/frame-scrub-hero/scene.js)MIT