Jump to content
Search Community

Animation stops on window resize.

Passionate test
Moderator Tag

Go to solution Solved by ZachSaucier,

Recommended Posts

  • Solution

It's not because of the rotation. It's because you switched the .to() to a .from() so when you set the progress to 0 (which is the from position) then effectively call another .from() animation the end values and start values are the same. So it looks like nothing is happening. If you're going to use a .from() with this method you should set the progress to 1 instead on resize. Something like this:

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

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

40 minutes ago, ZachSaucier said:

It's not because of the rotation. It's because you switched the .to() to a .from() so when you set the progress to 0 (which is the from position) then effectively call another .from() animation the end values and start values are the same. So it looks like nothing is happening. If you're going to use a .from() with this method you should set the progress to 1 instead on resize. Something like this:

 

 

I see, thx : )

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