이미 그려진 차트 위를 추적선과 점이 이동하고 현재 위치의 날짜와 값이 함께 바뀐다.A cursor and linked readout travel across a completed chart.
월별 매출을 훑으며 커서와 매출 숫자가 함께 이동한다.
커서는 6월인데 라벨은 5월 값을 표시한다.
기본값은 클립에 쓴 값Defaults are the values used in the clip
| 항목PARAM | 기본DEFAULT | 범위RANGE | 메모NOTE |
|---|---|---|---|
| 지속 | 2000ms | 1500~3000ms | 탐색을 읽을 시간 확보 |
| 데이터 점 | 20 | 10~40 | 날짜와 값 동기화 |
| 커서 폭 | 2px | 1~4px | 차트 선과 구별 |
const tl=gsap.timeline({paused:true}), s={p:0};
tl.to(s,{p:1,duration:2,ease:'power1.inOut',onUpdate:()=>{
const f=s.p*(values.length-1),i=Math.min(Math.floor(f),values.length-2);
const v=values[i]+(values[i+1]-values[i])*(f-i);
cursor.setAttribute('x1',100+800*s.p);cursor.setAttribute('x2',100+800*s.p);
dot.setAttribute('cx',100+800*s.p);dot.setAttribute('cy',500-v*4);
label.textContent=v.toFixed(1);
}});그대로 붙여 넣는다Paste as is
<파일>의 <대상>에 차트 스크럽을 적용해. 동일 진행값으로 선 위치, 데이터 보간 점, 인덱스 라벨을 계산한다. 지속 2000ms; 데이터 점 20; 커서 폭 2px을 적용한다. GSAP 코어의 paused 타임라인 하나로 seek 가능하게 만들고 임의 난수와 타이머를 쓰지 마.
Implement Chart Scrub on <target> in <file>. Scrub 20 samples over 2000ms with a 2px cursor, interpolating the dot and value from the same progress. Use one paused GSAP core timeline, support seeking, and avoid random values and timers.
<파일>의 설명 장면에서 <대상>에 차트 스크럽을 적용해. 동일 진행값으로 선 위치, 데이터 보간 점, 인덱스 라벨을 계산한다. 지속 2000ms; 데이터 점 20; 커서 폭 2px을 적용한다. 0초, 1초, 2초를 캡처해 시작 상태, 중간 진행, 최종 상태를 확인하고 같은 시각으로 다시 seek했을 때 좌표와 라벨이 같은지 검증해.
Implement Chart Scrub on <target> in <file>. Scrub 20 samples over 2000ms with a 2px cursor, interpolating the dot and value from the same progress. Use one paused GSAP core timeline, support seeking, and avoid random values and timers. Capture at 0s, 1s, and 2s to check the initial state, intermediate motion, and final state. Seek to each time again and verify identical geometry and labels.
HyperFrames · ReelForge · Scrolline
개념 출처와 라이선스. 구현은 이 레포에서 새로 씀Concept sources and licenses. Implementations are original to this repo
claude-skill:hyperframes-animation/rules/chart-scrub-readout.md)unknown