Jump to content
Search Community

Constant Rotation Animation

obi_wan test
Moderator Tag

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

Hey folks I was wandering how to achieve a constant rotation. Currently I have a tween that rotates but when it reaches the duration and degrees it stops for a very short period before the repeat-1 kicks in. Any idea on how to get a constant rotation without any stops in the animation?   

 

 

rotationExample = TweenMax.to($('.circle'), 15, {

        css:

        {

            rotation:360

        },

        repeat: -1,

        paused: false

    });
Link to comment
Share on other sites

I figured it out I simply had to remove the default easing and set it to ease:Linear.easeNone

 

rotationExample = TweenMax.to($('.circle'), 15, {
        css:
        {
            rotation:360
        },
        // remove default easing for seamless loop
        ease:Linear.easeNone
        repeat: -1,
        paused: false
});
  • 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...