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 ?
The Tween class is the class which handles all the animation, and can animate all properties that have a numeric value. These properties could be: x position. y position. alpha (opacity)
Tween manages the shift from one property value to another property value for an object. Tween - Abbreviation for "In-between". In animation, tweens are the frames that depict a character's or objects' motion between key frames.
The show() Method in jQuery is used to display the hidden and selected elements. Note: This method display the hidden elements which are using CSS display: none property. The elements are not visible whose visibility is hidden.
Definition and Usage The animate() method performs a custom animation of a set of CSS properties. This method changes an element from one state to another with CSS styles. The CSS property value is changed gradually, to create an animated effect. Only numeric values can be animated (like "margin:30px").
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With