Skip to main content
100%

SVG text experiment - Text along multiple paths using GreenSock

✓ Published1🌍 Public
LLaurens
Last edited Jul 8, 2020
Created on Jul 8, 2020

A short, looping animation moves the word "served" along a rectangular path rendered in an SVG. The path is drawn using `d3.path().rect()` and attached to the text element via an `href` reference, while GreenSock's `gsap.from` with an `attr` tween animates the `startOffset` attribute of the `textPath` from 100% to 0%. The example demonstrates combining d3 for path construction and SVG creation with GreenSock for attribute-based animation, all within a fixed 1000x500 viewBox.

AI-generated description

Animating text along a path using d3+greensock

Steps taken

  • Start from an old greensock example, here
  • Move all svg code to js so elements can be created and manipulated dynamically
  • Clean up this project so it can be used as an examle or template
MIT Licensed

Similar vizzes