Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
vuvuzela

greensock timline does not work properly

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

My greensock timeline only executes the second timeline instruction. If I comment out the second one, the first tween works. What is wrong with the timing?

tl.to($img, .3, {rotation: 0, ease:Linear.easeNone}, 0)
      .fromTo($img, .3, {rotation: 0, ease:Linear.easeNone}, {rotation: 10, yoyo:true, repeat:-1, ease:Linear.easeNone}, 0);
Link to post
Share on other sites

You built conflicting tweens. You set them both to start at "0", and they're both trying to animate the same property of the same object to different values. The first tells $img.rotation to go to 0, the second tells it to go to 10 (at exactly the same time). Which do you want? 

  • Like 1
Link to post
Share on other sites

Did you mean your first tween to be a set() tween instead of a to() so you set your initial rotation value?

Link to post
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.

×