Jump to content
GreenSock

DW92

GSAP DrawSVG on scrollTrigger with stroke-dasharray

Moderator Tag
Go to solution Solved by Cassie,

Recommended Posts

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

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. 🕶️

  • Like 1
  • Haha 2
Link to comment
Share on other sites

20 hours ago, Cassie said:

Hey there!


Here you go - 

 

 


Thanks! Works great for me! :)

  • Like 1
Link to comment
Share on other sites

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

giphy.gif

  • Haha 1
Link to comment
Share on other sites

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. :ph34r:

  • Haha 2
Link to comment
Share on other sites

Hah. Sorry @PointC for ignoring you :) Cassie's solution was so good, that I went straight to coding :D

  • Like 2
Link to comment
Share on other sites

1 minute ago, DW92 said:

Sorry @PointC for ignoring you :) Cassie's solution was so good, that I went straight to coding :D

No worries. @Cassie is the genius. I just pretend to know what I'm doing. 

  • Haha 2
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×