Jump to content
Search Community

GSAP Adaptation of Codedrops Hover Effect

jstafford test
Moderator Tag

Go to solution Solved by PointC,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I was trying to adapt Carl's dash chaser to pull this off http://tympanus.net/Tutorials/BorderAnimationSVG/ . I am having little success. Is there anyone that could help me out with this?

 

I will put it out there that adapting the three paths of Carl's chaser dash animation to this problem is confusing to me. I felt to pull this off, I would need an offset of 1, but in the codedrops demo they are using a border line that is 3x the length of any border with a dash offset equal to the border length. They simply translate the line and the offset makes it look like the border is animating within the viewbox.

See the Pen MYMOpP?editors=001 by GreenSock (@GreenSock) on CodePen

Link to comment
Share on other sites

  • Solution

Hey jstafford :),

 

You really wouldn't need any dashes or extra length borders to make this happen with drawSVG. It's just a matter of using a fromTo() a couple times to animate the lines.

 

I made a quick CodePen for you: 

See the Pen VeKgNX by PointC (@PointC) on CodePen

 

You'll have to adapt it for your use, but it should get you started.

 

Happy tweening. :)

  • Like 3
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...