Search the web
Sign In
New User? Sign Up
ydn-javascript · Yahoo! User Interface Library Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
YUI easeNone various from other frameworks   Message List  
Reply | Forward Message #40049 of 52115 |
Re: [ydn-javascript] YUI easeNone various from other frameworks

Hi Matt,

Thanks for the feedback and test cases.

I took a look, and it appears that the other animation engines tested
use a sinoidal easing as the default. YUI's "easeBoth" is the closest
match to this type of easing.

I hacked together a YUI easing that incorporates the sinoidal algorithm:

YAHOO.util.Easing.custom = function(t, b, c, d) {
t = t / 1000; // convert milliseconds to seconds
return ((-Math.cos(t*Math.PI)/2) + 0.5) * c + b;
};

This keeps the YUI animation in step with the other tests.

The Firebug profiler (with Firefox 3.03) reports that the YUI easing is
called 101 times, vs. 76 and 67 for the others. What method of
profiling are you using?

I am unable to repro the NaN issue with the easing arguments. Would you
mind following up with some more detail on that?

Thanks,

Matt

Matt wrote:
> I have put together a test page, so you can see what I mean:
>
> http://www.mattsnider.com/AnimationSpeedTest.html
>
> If you click "Animate All", you'll see that YUI takes larger steps
> than the other frameworks. Also, it initially starts farther ahead
> than the other frameworks, then swings behind the other animations.
>
> With further analysis, I realized that YUI only calls the easing
> method about 10 times, versus about 40 times with the other
> frameworks. In addition, every other time EaseNone is called, 't' and
> 'c' are 'NaN' instead of numbers, so I assume that YUI animator
> ignores those values.
>
> http://developer.yahoo.com/yui/docs/Easing.js.html
>
> Is there a configurable property to make this animation smoother? I'd
> like to get the same animation effect from YUI that I get with JQuery.
>




Tue Oct 28, 2008 7:56 pm

matt.sweeney
Offline Offline
Send Email Send Email

Forward
Message #40049 of 52115 |
Expand Messages Author Sort by Date

I have put together a test page, so you can see what I mean: http://www.mattsnider.com/AnimationSpeedTest.html If you click "Animate All", you'll see that YUI...
Matt
cyberlogi
Offline Send Email
Oct 27, 2008
10:47 pm

Hi Matt, Thanks for the feedback and test cases. I took a look, and it appears that the other animation engines tested use a sinoidal easing as the default....
Matt Sweeney
matt.sweeney
Offline Send Email
Oct 28, 2008
7:57 pm

Thanks Matt, I'm getting the desired effect with your sinoidal easing. You are right about how many times the profiler says the function executes, however I...
Matt
cyberlogi
Offline Send Email
Oct 28, 2008
9:05 pm

Hey Matt, Thanks for following up. I added the following to the YUI portion of your tests: var YUI_EASE_DATA = []; YAHOO.util.Easing.custom = function(t, b, c,...
Matt Sweeney
matt.sweeney
Offline Send Email
Oct 28, 2008
10:38 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help