Jump to content
Search Community

Having issues animating dotted line in svg

dan098 test
Moderator Tag

Go to solution Solved by akapowl,

Recommended Posts

  • Solution

Welcome to the GreenSock forums @dan098

 

First off, you forgot to load the DrawSVGPlugin - also you are using rather old versions of GSAP and ScrollTrigger, best stay up to date.

 

Technically things should already work after adding the DrawSVGPlugin - but I don't think it is possible to draw out dashed strokes like you have there - not even with the DrawSVGPlugin if I am not mistaken.

 

If you want to draw out dashed paths, you will probably have to mask the path itself and animate the mask instead.

 

I recommend having a look at @PointC's tutorial over on motiontricks.com for something like that.

 

https://www.motiontricks.com/svg-dashed-line-animation/

 

 

 

Here's a pen just showing that the drawing itself already works when you load the plugin

 

See the Pen bGLyPEM by akapowl (@akapowl) on CodePen

 

 

 

  • Like 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.
×
×
  • Create New...