Animate SVG path on scroll
An SVG path of a hand-drawn line animates as the user scrolls, revealing the path incrementally down a tall 20,000-pixel viewport. Using D3 and Lodash, the example maps the browser’s scroll position to the length of the path, drawing only up to a fixed horizontal line (indicated by a marker div). As the user scrolls, the path appears to draw itself progressively, stopping when it reaches the marker. The visualization demonstrates a scroll-driven animation technique applied to a single SVG path with a minimal, fixed marker overlay.
AI-generated descriptionMake sure to pop out to a new window, and then scroll.
An experiment to see if I can get svg paths to animate only to a certain horizontal line while a user scrolls. Used in my unreleased wongfu side project.
Built with blockbuilder.org
forked from <a href='http://bl.ocks.org/sxywu/'>sxywu</a>'s block: <a href='http://bl.ocks.org/sxywu/cdff7e8538477e7222b8'>Animate SVG path on scroll</a>
forked from <a href='http://bl.ocks.org/ajayjayayy/'>ajayjayayy</a>'s block: <a href='http://bl.ocks.org/ajayjayayy/bec836a9239dbad443c673348d2205ae'>Animate SVG path on scroll</a>