Jump to content
Search Community

Infinite rotation starting with easeOut and ending infinite with ease linear

Black Ducas test
Moderator Tag

Recommended Posts

Yeah @Sahil, that's awesome! ? Thanks

 

Could I ask you some details?

1) Why you use timeline for first tween? Is it needed or it works also with a simple tween? If I'm not wrong we should use tween as much as possible, in place of timelines, right? ? 

2) For the first second (duration:1) of the whole animation we have 3 tweens that act at the same time on the same element. Is this a common technique from the docs or it could causes conflicts?

 

Thanks again.

 

  • Like 1
Link to comment
Share on other sites

16 hours ago, Sahil said:

@GreenSock has something changed with timeScale in gsap 3?

Good catch, @Sahil! This was really tricky to diagnose - it'd only happen if you set the timeScale() on the same tick as a tween starts that's also affecting that timeScale() of the other animation. It should be resolved in the next release which you can preview at https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/gsap-latest-beta.min.js

 

?

 

Does that work better for ya? 

  • Like 3
Link to comment
Share on other sites

That is expected behavior - remember, when you pause() an animation, that effectively sets its timeScale to 0, so when you play() that sets it back to 1. There is extra code to allow edge cases where you set timeScale apart from play/pause, but I'm not sure how we could reconcile the logic in the scenario you presented. If you set the timeScale to 0...and then you call play() on an animation...what would you expect to happen? Should it just not do anything (remain paused)? That wouldn't sound very intuitive. See the issue? 

  • Like 2
Link to comment
Share on other sites

Hey Jack,

 

Thank you for your comments.

 

In my imagination timeScale(0) is like paused().
Just as it works in the stop function.

 

But if this is a conflict in combination with play(), then let's give a hint in the DOCs, show an example.

 

I find the possibility to arrange start / stop smooth with timeScale() very helpful - I have also integrated an ease: "power4.in".

 

See the Pen KKwvMQb by mikeK (@mikeK) on CodePen

 

Happy smoothing ...

Mikel

 

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