Jump to content
Search Community

Timeline control

Desque test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

Hello Everyone! Is there any way where I can control the animation of the timeline based on the % or keyframes? Let's say that I want the first animation to take 50% of the entire timeline and the 2nd one 30% and the 3rd one 20%. Instead of having to make multiple animations?

 

See the Pen OJBmpJP by kevinfphan (@kevinfphan) on CodePen

Link to comment
Share on other sites

Hi there!


Apologies for the lack of response so far, but it looks like people are struggling to help with this question. I don't see it disappear when scrolling back up, but perhaps I'm misunderstanding. Here are some tips that will increase your chance of getting a solid answer:
 

  • A clear description of the expected result - "I am expecting the purple div to spin 360degrees"
  • A clear description of the issue -  "the purple div only spins 90deg"
  • A list of steps for someone else to recreate the issue - "Open the demo on mobile in IOS safari and scroll down to the grey container" 
  • A minimal demo (you got one...great!).

 

  • Like 1
Link to comment
Share on other sites

5 hours ago, GSAP Helper said:

Hi there!


Apologies for the lack of response so far, but it looks like people are struggling to help with this question. I don't see it disappear when scrolling back up, but perhaps I'm misunderstanding. Here are some tips that will increase your chance of getting a solid answer:
 

  • A clear description of the expected result - "I am expecting the purple div to spin 360degrees"
  • A clear description of the issue -  "the purple div only spins 90deg"
  • A list of steps for someone else to recreate the issue - "Open the demo on mobile in IOS safari and scroll down to the grey container" 
  • A minimal demo (you got one...great!).

 

Hey! So for the 2nd demo. After I scroll all the way till the end and get passed the end marker. When I scroll back up, once it gets passed that end marker. My logo disappears. I expect the logo to naturally animate in reverse like the 1st demo. Thank you

Link to comment
Share on other sites

  • Solution

Heya!

 

You're using the element you're animating as a trigger. that's where the issue's coming from.

Use static elements as triggers and you'll be a ok. Moving the trigger around messes up measurements and calculations.

here you go - (using the body to demonstrate)

 

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

  • Like 2
Link to comment
Share on other sites

On 4/27/2023 at 7:37 AM, Cassie said:

Heya!

 

You're using the element you're animating as a trigger. that's where the issue's coming from.

Use static elements as triggers and you'll be a ok. Moving the trigger around messes up measurements and calculations.

here you go - (using the body to demonstrate)

 

 

 

Fantastic. Thank you so much!

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