Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
M. Tarık

TweenMax in Starling, possible issue with radian conversion

Recommended Posts

Hi there.

I'm trying to use TweenMax.to() in a starling app with the ease option of Circ.easeInOut while rotating a view. I used the same thing in a flash app and there was no problem. But in Starling, when the animation is about to finish, the view speeds up suddenly and then slows down. I guess it's because Starling only works with radians, and somewhere in the code TweenMax uses degree values. 

 

Same problem occurs between two rotating animations: I mean when the first animation is finished, a second one is called in the onComplete method and the same sudden speeding-up problem is seen during this transition. 

 

Any solution?

Link to comment
Share on other sites

Are you just doing a regular "rotation" tween? TweenMax does NOT use any specific unit value - it just tweens whatever values are provided, that's it. No special translation or anything. For example, if obj.rotation is currently 0 and you tween it to 180, it'll do that. If it's 0 and you tween to 3.14 (like a radian-based equivalent), it'll do that. I'm not sure what may be causing the behavior you're describing (tough to know without seeing a simplified example FLA). 

 

You are feeding in radian-based destination values, right? 

Link to comment
Share on other sites

Yes it does when I don't use ease option like {ease:Circ.easeInOut}. But when I do, it speeds up where it needs to slow down smoothly.

Link to comment
Share on other sites

Are you saying that with all other eases it works as expected, but only Circ.easeInOut acts weird? I just tested Circ.easeInOut and it seems to be working fine for a normal tween in Flash. Feel free to post a very simple FLA (with all dependencies including starling) that we can publish to see the strange behavior.

Link to comment
Share on other sites

No not weird. The view slows down eventually. I can't give the code unfortunately, as much as I want to, let me explain it: The view starts to rotate with the option of ease:Circ.easeInOut. Assume the view should slow down starting from time t. But between t and t+0.5, where unit of t is seconds, it accelerates shortly, then it continues to slow down and stops. My question is, at the moment of t, there must be a value for decreasing of velocity of the view for Circ option. Is this value calculated as radian or degree?  

Link to comment
Share on other sites

The easing equations don't have ANY unit allocation whatsoever (there's no need for that). They're completely generic (as they should be). Feel free to peek at the code. 

 

Are you not able to share any sample whatsoever? Not even a generic, super-simple FLA with a rectangle that rotates or something?

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