The Karma Project: Code Less, Teach More

June 12, 2009

think again

Filed under: News — subzero @ 8:00 am

Hi guys.

Working with animations, I realized some things that I had not stopped to think about them until now.

jQuery uses an animate effect, usually we alter the property values of the element we want to affect.

animate syntax is really simple:
animate (params, [duration], [easing], [callback])

The point is that it sets the duration (call it t) and not speed (v). If we want to move an item from one position to another we fix this little detail setting the duration (t) depending on the speed and distance: t = d / v. The problem is that we always have to adjust the settings .. and what would happen if you don’t know the distance?.

I think a better approach is to set the speed. Following Flash dogma we have frames per second (fps), but here (jQuery – Karma) we have (at this point) no frames, in the real life we have meters per second (mps) and others….perhaps something like “pixels” per second might work?



Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

%d bloggers like this: