All examples By author By category About

rveciana

Canvas & svg-path-properties Point-Along-Path Interpolation

Canvas version of this block by Mike Bostock, using the svg-path-properties library

This example demonstrates how to use the getTotalLength and getPointAtLength methods on SVG path elements using the svg-path-properties library to interpolate a point along a Catmull–Rom spline.