along path
✓ Published0🌍 Public
SSleepyHarry
Last edited Jan 15, 2017
Created on Jan 15, 2017
Two blue circles follow a looping cubic Bézier path across a wide SVG canvas, moving in a continuous cycle. The example demonstrates a custom `attrTween` via D3 v4’s `transition.attrTween`, which interpolates each circle’s `transform` attribute based on the path’s geometry. It uses `path.getTotalLength()` and `path.getPointAtLength()` to sample positions along the path over a 10-second duration. The circles start at different offsets (0 and 0.1) to create a staggered motion, repeating indefinitely via the transition’s `end` event.
AI-generated descriptionBuilt with blockbuilder.org
mit Licensed