지도 위의 곡선이 그려지고 표식이나 비행기가 경로를 따라 이동한다.A route is drawn as a marker travels along its geometry.
서울에서 부산까지 선을 그리며 표식을 2초 동안 이동시킨다.
곡선만으로 실제 비행 경로와 속도를 단정한다.
기본값은 클립에 쓴 값Defaults are the values used in the clip
| 항목PARAM | 기본DEFAULT | 범위RANGE | 메모NOTE |
|---|---|---|---|
| 이동 지속 | 2000ms | 1200~4000ms | 길이 기준 이동 |
| 도착 강조 | 300ms | 200~500ms | 도착 이후 시작 |
| 경로 폭 | 4px | 2~6px | 지도 배경과 대비 |
const tl=gsap.timeline({paused:true}),s={p:0},L=route.getTotalLength();
gsap.set(route,{strokeDasharray:L,strokeDashoffset:L});
tl.to(s,{p:1,duration:2,ease:'none',onUpdate:()=>{
const q=route.getPointAtLength(s.p*L);
marker.setAttribute('transform',`translate(${q.x} ${q.y})`);
route.style.strokeDashoffset=L*(1-s.p);
}});그대로 붙여 넣는다Paste as is
<파일>의 <대상>에 지도 경로 애니메이션을 적용해. 지도 좌표의 베지어 경로를 그리며 이동체의 위치와 접선을 계산한다. 이동 지속 2000ms; 도착 강조 300ms; 경로 폭 4px을 적용한다. GSAP 코어의 paused 타임라인 하나로 seek 가능하게 만들고 임의 난수와 타이머를 쓰지 마.
Implement Map Route Animation on <target> in <file>. Draw and traverse the route over 2000ms with a 4px stroke and linear progress. Add a 300ms arrival pulse after the marker arrives. Use one paused GSAP core timeline, support seeking, and avoid random values and timers.
<파일>의 설명 장면에서 <대상>에 지도 경로 애니메이션을 적용해. 지도 좌표의 베지어 경로를 그리며 이동체의 위치와 접선을 계산한다. 이동 지속 2000ms; 도착 강조 300ms; 경로 폭 4px을 적용한다. 0초, 1초, 2초를 캡처해 시작 상태, 중간 진행, 최종 상태를 확인하고 같은 시각으로 다시 seek했을 때 좌표와 라벨이 같은지 검증해.
Implement Map Route Animation on <target> in <file>. Draw and traverse the route over 2000ms with a 4px stroke and linear progress. Add a 300ms arrival pulse after the marker arrives. 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