lmgonzalves / segment

A JavaScript library to draw and animate SVG path strokes
http://lmgonzalves.github.io/segment
MIT License
1.74k stars 98 forks source link

Dashed path possible? #1

Open dstollie opened 8 years ago

dstollie commented 8 years ago

We are exactly looking for this kind of solution The only i couldnt find is the possibility to make the path, dashed. Is this possible?

Thanks

Dennis

lmgonzalves commented 8 years ago

Hi Dennis, thanks to be in touch. Dashed paths it's not possible using Segment (for now). Maybe in a future version I consider to implement it. But if what you want to do is quite simple, for example a fixed pattern for the dashed lines; you can take a look at this excellent tutorial, it is very simple. And together with an animation library as GSAP (to animate stroke-dashoffset), you may achieve what you want :) If you want, you can also contribute with this repository making a pull request ;)