Jump to content
Search Community

Timelines delay before they yoyo back!!!!!

Elicrespo test
Moderator Tag

Recommended Posts

Hey guys,

 

I have an issue with my animation, when the pixels travel from left to right and yoyo back, the timeline stops for a second, you can notice a delay until the timeline starts again. Both of them do that. 

 

I would like it to be continuous, just like when the pixels arrive to the right side and bounce right back. I want the pixels to bounce again as soon as they arrive to the left side.

 

What am I doing wrong?? How can I overcome this?

 

Thank you.

See the Pen VwqeVXv by elicrespo (@elicrespo) on CodePen

Link to comment
Share on other sites

If I understand you correctly, there isn't actually any delay - it's just that you're using an ease that makes it appear that way. Also, there's no such thing as setting a duration or ease in a timeline's config object. I assume you meant to set a default for child tweens?

 

// BAD
gsap.timeline({ 
  yoyo: true, 
  repeat:-1, 
  duration: 0.7, // <-- NOPE!
  ease: "none"   // <-- NOPE!
});

// GOOD
gsap.timeline({ 
  yoyo: true, 
  repeat:-1, 
  defaults: { // <-- important
    duration: 0.7,
    ease: "none"
  }
})

 

Is this more like what you're looking for? 

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

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