Reputation: 10651
I have come across this term for quite a few times, but I can't find detailed definition about it.
For example, parameter fx
in some jQuery methods is Tween.init
.
Can anyone offer some help ?
Upvotes: 23
Views: 9767
Reputation: 7225
The objects and methods used around jQuery animations - tweens, tweeners, hooks, prefilters, etc - are very poorly documented, even though they appear to be part of the public API. Perhaps it helps to list some resources here.
This is what the draft documentation has to say about the properties and methods of the Tween object:
elem
: The element being animatedprop
: The property being animatedeasing
: The easing usedoptions
: A reference to the animation optionsstart
: The starting value of the tweennow
: The current value of the tweenend
: The ending value of the tweenunit
: The CSS unit for the tweencur()
: Reads the current value for property from the elementrun( progress )
: progress is a number from 0 to 1. Updates the value for the property on the animated element.
A Tween instance is passed to the step
callback of a jQuery animation and can be used to manipulate the animation while it is in progress. Knowing about the Tween API might come in handy there.
Upvotes: 11
Reputation: 10012
Tween is used in animation in JQuery. Tween.js being a standalone example of Tween.
Short for in-betweening, the process of generating intermediate frames between two images to give the appearance that the first image evolves smoothly into the second image. Tweening is a key process in all types of animation, including computer animation. Sophisticated animation software enables you to identify specific objects in an image and define how they should move and change during the tweening process.
From http://www.webopedia.com/TERM/T/tweening.html
Upvotes: 20