Share Posted February 17 Hey. I have a simple SVG with stroke-dasharray, and I want to animate it using ScrollTrigger. The problem is - I want to reveal my SVG pattern with stroke-dasharray not modified, but when I do animate it, my stroke-dasharray disapears, making my svg a straight line. Is there a way to animate it the way I want to do it? Without losing dashed pattern? See the Pen oNPXQVY by DW922 (@DW922) on CodePen Link to comment Share on other sites More sharing options...
Solution Solution Share Posted February 17 Hey there! Here you go - See the Pen poebgbg by team (@team) on CodePen 1 Link to comment Share on other sites More sharing options...
Share Posted February 17 Hi @DW92 and welcome to the GreenSock forums! I'm not really an expert in SVG but I think the issue you're having is explained in this tutorial by @PointC: https://www.motiontricks.com/svg-dashed-line-animation/ Hopefully that solves your issue. Let us know if you have more questions. Happy Tweening! 1 Link to comment Share on other sites More sharing options...
Share Posted February 18 6 hours ago, Rodrigo said: I think the issue you're having is explained in this tutorial by @PointC: I've heard of him. He seems cool. 🕶️ 1 2 Link to comment Share on other sites More sharing options...
Author Share Posted February 18 20 hours ago, Cassie said: Hey there! Here you go - Thanks! Works great for me! 1 Link to comment Share on other sites More sharing options...
Share Posted February 20 On 2/17/2023 at 9:19 PM, PointC said: I've heard of him. He seems cool. 🕶️ Mhh... you're copying my ninja style I see 🥷, in and out without being noticed 1 Link to comment Share on other sites More sharing options...
Share Posted February 20 2 hours ago, Rodrigo said: Mhh... you're copying my ninja style I see 🥷, in and out without being noticed GSAP wasn't the only thing I've learned from you over the years. 2 Link to comment Share on other sites More sharing options...
Author Share Posted February 20 Hah. Sorry @PointC for ignoring you Cassie's solution was so good, that I went straight to coding 2 Link to comment Share on other sites More sharing options...
Share Posted February 20 1 minute ago, DW92 said: Sorry @PointC for ignoring you Cassie's solution was so good, that I went straight to coding No worries. @Cassie is the genius. I just pretend to know what I'm doing. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now