Jump to content
Search Community

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Posted

Hi everyone, my situation is this:

 

I have two timelines, one for the loading initial animation and another one for the coreography when the page is loaded.
The animation of the loader (a spinner) is made more or less the same as the codepen linked but in this way, as you can see, the rotation doesn't stop properly. (In simple words i want to pause the rotation animation WHEN the page is loaded, but I doesn't want to stop that if it's still moving)

tlTimeline
    .to(test, 1, {rotation: "+=90", repeat: -1, repeatDelay: 1, onRepeat: loaded});
  
  function loaded(){
    tlTimeline.pause();
    tlOpening.play(); //this one is not included in the codepen

  }

I need to find another way to stop the repeat animation at the end of the repeat animation because in this way it makes a little step forwards.

 

 

See the Pen reqmjq by anon (@anon) on CodePen.

Posted

Hi dghez :)

 

I'm not quite sure of your desired behavior here, but wouldn't your spinning animation disappear once the content has loaded? 

 

If you're creating a loader animation, this post should help:

http://greensock.com/forums/topic/13216-images-preload/?p=54633

 

Jonathan has a nice simulated loader animation here:

See the Pen jbdgPg by jonathan (@jonathan) on CodePen.

 

Hopefully that helps a bit.

 

Happy tweening.

:)

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