Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
explorerzip

Timing Multiple Animations

Recommended Posts

I have a banner animation where I want the plane graphic to leave a dotted trail behind it as it flies. I am having difficulty getting the timing right. Specifically, the plane completes its movement before the dotted path is revealed. The dotted path actually doesn't animate. I am changing the strokeDashoffset of the white path, which reveals the yellow dotted path beneath.

 

So I'm wondering how to go about syncing the plane movement with the path reveal? I have tried negative offsets for the second "path" tween, but to no avail. Perhaps there is a better way to achieve this same effect without the need for the white path above the yellow dotted path?

 

I also have the issue where the plane first appears at the top left or "end" of the dotted path and instantly warps to the "start" of the dotted path, but it doesn't show up that well in CodePen.


Perhaps there are ways to optimize my css too?

See the Pen xxZRJGj by explorerzip (@explorerzip) on CodePen

Share this post


Link to post
Share on other sites

Sorry my last post was incorrect.

 

You just have to change the starting value of the strokeDashoffset to one that is closer to the end value:

See the Pen yLegepR?editors=0010 by GreenSock (@GreenSock) on CodePen

Share this post


Link to post
Share on other sites

Oh cool. Thanks so much for the speedy response. Any thoughts on how to fix the warping of the plane image from the end of the path to the start on first load?

Share this post


Link to post
Share on other sites

You could either fix the SVG so that it's pointing to the left instead of upper left or use an autoRotate value like -20.

  • Thanks 1

Share this post


Link to post
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.

×