Jump to content
Search Community

"Swing" motion stops after first swing, only then continues naturally

Robert Wildling
Moderator Tag

Recommended Posts

Robert Wildling
Posted

Hi, fellow GSAPers!

 

May I ask for your help, please?!?

The codepen shows a pendulum like motion - or should. Because for some reason, after the very first pendulum motion, there is a strange delay. Only then it continues naturally. 

Do you happens to know why? And what the solution would be?

 

Thank you!

See the Pen MWNLXry by rowild (@rowild) on CodePen.

Posted

I would use CustomWiggle for this. I don't know why your code doesn't work, but it seems like you're trying to build your own easing function, but doing it in onComplete callbacks. That would require a lot of trail and error, to figure out what is overwriting what (because I think that is the issue here, things trying to overwrite other things). 

 

If you would want to build it your self I would definitely do it in an ease function, but then you're building the CustomEase (and CustomWiggle) plugin, and that is something that is already solved for you with all the gotchas figured out, so I'm not sure how to help here. Happy tweening!

 

See the Pen BaXMPvQ?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen.

  • Like 3
Robert Wildling
Posted

Thanks for your response! Your solution does not do anything - not sure if that is on purpose...
I will look into CustomWiggle, thanks for that tip!

Posted

Seems like there was an error in my code. I've updated it now. Hope it helps and happy tweening! 

  • Like 1
Posted

Hi,

 

On top of @mvaneijgen's great demo, check this thread just in case:

 

Hopefully this helps

Happy Tweening!

  • Like 1
Robert Wildling
Posted

@mvaneijgen Thank you very much for your help! Wonderful demo! I'll look into that!
@Rodrigo Thank you for your reply and the link to another source, which is also really beautiful!
 

  • Like 1

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