Jump to content
Search Community

Endpoint of stroke is wrong

roogud test
Moderator Tag

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

Hey all.

 

So I'm trying to animate a part of my logo (the infinity sign). What I eventually want to do is to animate the infinity sign on hover. But I'm just setting everything up and seeing if it works. However, it looks like the endpoint of my infinity sign is the actual endpoint of the stroke. You can see it on my codepen. Can someone help me figure out how I can make the startpoint be the leftMostPoint and have the endpoint be the rightMostPoint?

 

Thanks!

See the Pen xJgQEj by roogud (@roogud) on CodePen

Link to comment
Share on other sites

Hi @roogud :)

 

Welcome to the forum.

 

I think you may have to rework your path. I forked your pen and changed the stroke to 1px. Watch the animation and use the scrubber. See how the path animates the shape, but then goes over itself again? It looks like there are two identical paths mashed into one. I'm not 100% sure what you're going for here, but that's probably not going to produce the desired results.

 

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

 

 Hopefully that helps. Happy tweening.

:)

 

  • Like 3
Link to comment
Share on other sites

Ah okay. Yea, I'll probably have to recreate the stroke. Thanks :)

 

But the plan is to animate a full loop on hover. So it the stroke starts at 100% and then on hover it goes to 0% and then again to 100%. And I'm hoping that the "gap" will act like a mask. Do you think it would be better to have a fully connected infinity symbol and just use offset or would this work?

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