along path
✓ Published0🌍 Public
SSleepyHarry
Last edited Jan 15, 2017
Created on Jan 15, 2017
A steel-blue dot loops indefinitely along a black cubic Bézier curve drawn through seven fixed points on an SVG canvas. The path is hardcoded in the markup, while the points themselves are rendered as small circles. Using D3 v4, the animation repeatedly calls `transition.attrTween` with the `translateAlong` function, which relies on `path.getTotalLength()` and `path.getPointAtLength()` to compute the dot's position each frame, restarting the transition via `each("end", transition)`.
AI-generated descriptionBuilt with blockbuilder.org
mit Licensed