Jump to content
Search Community

(possible bug?) Strange behavior updating rotate tweens.

Burdock test
Moderator Tag

Go to solution Solved by Diaco,

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

I have been working on a 2d/3d transition effect module, and I have been running into some issues integrating with gsap (TweenLite).
 
Most of the Tweens require updating on every $("window").resize() function if they have any media queries. Unfortunately I have been running into issues overwriting TweenLite.to's that involve rotations. 

 

A good example of this is a simple "hamburger" icon animation. In the below codepen is a decent example of the issue. If you resize the window while the button is in the X state (or navState = 1) the rotation tween acts as though its stuck in the tween.progress=0 state;

 

 

By changing rotationZ: to rotation: the tween rotation get stuck in the tween.progress=1 state.

 

See the Pen MwYmxa by anon (@anon) on CodePen

 

If anyone can shed some light on this issue it would be much appreciated. 

 

Thanks, 

  Daniel 

See the Pen MwYmVW by anon (@anon) on CodePen

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