[英]jQuery - What is a Tween object?
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
. 例如,某些jQuery方法中的参数fx
是Tween.init
。
Can anyone offer some help ? 有人可以提供一些帮助吗?
Tween is used in animation in JQuery. Tween用于JQuery中的动画 。 Tween.js being a standalone example of Tween. Tween.js是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 来自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. 补间,tweeners,钩,预过滤器,等等- -围绕jQuery的动画使用的对象和方法都非常糟糕记录,尽管他们似乎是公共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: 这就是文档草案对Tween对象的属性和方法所说的内容:
elem
: The element being animatedelem
:动画元素prop
: The property being animatedprop
:动画属性easing
: The easing usedeasing
:使用宽松options
: A reference to the animation optionsoptions
:对动画选项的引用start
: The starting value of the tweenstart
:补间的起始值now
: The current value of the tweennow
:补间的当前值end
: The ending value of the tweenend
:补间的结束值unit
: The CSS unit for the tweenunit
:补间的CSS单位cur()
: Reads the current value for property from the elementcur()
:从元素中读取属性的当前值run( progress )
: progress is a number from 0 to 1. Updates the value for the property on the animated element.run( progress )
:progress是一个从0到1的数字。更新动画元素上属性的值。
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. 将Tween实例传递给jQuery动画的step
回调 ,并可用于在动画正在进行时操纵它。 Knowing about the Tween API might come in handy there. 了解Tween API可能会派上用场。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.