Jump to content
Search Community

Synchronise animation

Regis 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

Hi,

 

Thanks the video is very interesting, but when i was talking about position it's about physical position not timing.

I would like to have an animation with the bar starting at the left of the screen the growing upward the other side.

When it's X position is at the position of the first character of the text it start the stager of the text. In the stager each letter animation should start when the bar is at the X position of the letter.

One of the solution is to take the duration wanted to cross the screen, search the time (t1) when the bar reach the text position, compute the time to reach the end postion to reach the end of the text, take this time and affect it to the stagger duration and start the stagger at t1.

But maybe there's an easier way of doing it ?

Link to comment
Share on other sites

Hi Regis :),

 

I'm not sure if this is exactly what you mean, but I just flipped your timeline a bit starting with the bar animation and then overlapping the staggered text. I didn't do any calculations so the letters may not be a perfect match to when the bar hits their x position, but that is happening so fast, I'm not sure anyone would notice.

 

You can probably get the bar position and calculate the position of each letter and get that all perfectly synchronized, but that seems like a lot of work for such a fast animation. :) I just eyeballed the overlap time in my example.

 

If you need more precision to make it absolutely perfect, I'm sure some of the mods can help you. 

 

Hopefully this helps a bit. :)

 

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

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