This is a take on Mike Bostock’s approach to drawing a gradient along a path, but using GSAP . Specifically, it takes advantage of the MotionPathPlugin to calculate the necessary points and angles along the path.