fieldsye / actuate

Automatically exported from code.google.com/p/actuate
0 stars 0 forks source link

EaseOut stuttering [subpixel problem?] #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When I use a simple EaseOut animation to rotate and move an item:
Actuate.tween(item, 2, { rotationY:90, x:10, z:10 } ).onComplete(function() {});
its a bit stuttering at the end (subpixels?). It will stop for some frames and 
then move a pixel at the end. Is there some kind of rounding problem somewhere 
in the easing functions? Flash-Tweens [AS3 based] don't stutter and ease out a 
bit better

Original issue reported on code.google.com by bug.me.not.dude@googlemail.com on 5 Aug 2010 at 10:25

GoogleCodeExporter commented 8 years ago
Here are some graphs of various easing equations:

http://hosted.zeh.com.br/tweener/docs/en-us/misc/transitions.html

Expo.easeOut is the default equation for Actuate. As you can see, however, it 
has a lot of lead out time, so if you have a long tween over a short distance, 
you may be able to see this type of problem.

Here are two ways that animation may become smoother:

Actuate.tween (item, 1, { rotationY: 90, x: 10, z: 10 } );
Actuate.tween (item, 2, { rotationY: 90, x: 10, z: 10 } ).ease (Quad.easeOut);

You can play with different easing types to find something you like. If you 
prefer a different easing style for all your animations, you can set Actuate's 
default, like this:

Actuate.defaultEase = Quad.easeOut;

All of the easing equations are located in the 
com.eclecticdesignstudio.motion.easing package

Original comment by joshuagr...@gmail.com on 10 Aug 2010 at 4:23