- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
他们说:
The timing protocol provides the means of starting an animation a certain number of seconds into its duration using two properties: beginTime and timeOffset. The beginTime specifies the number of seconds into the duration the animation should start and is scaled to the timespace of the animation's layer. The timeOffset specifies an additional offset, but is stated in the local active time. Both values are combined to determine the final starting offset.
我了解时空。但我在这里很难理解他们的话。
“缩放到动画层的时间空间。”
假设我有这个:
那么0.25秒后就会实时开始? (双倍 super 层速度,双倍子层速度,因此我们有四倍速度。动画师的本地速度为 1。所以仍然是四倍速度。)。
并且 timeOffset 被规定为“以本地事件时间”。他们的意思是被速度扭曲的时间?即,如果动画器对象的速度属性为 1.0,这就是此处的本地事件时间?
本地活跃时间对我来说确实意味着很多不同的事情。例如时钟时间,或者整个时空层次结构中的时间,它如何影响底部的时间。如果有人能在这里指出详细信息,那就太好了。
最佳答案
查看核心动画的标题;特别是CAMediaTiming.h:
/* The CAMediaTiming protocol is implemented by layers and animations, it
* models a hierarchical timing system, with each object describing the
* mapping from time values in the object's parent to local time.
*
* Absolute time is defined as mach time converted to seconds. The
* CACurrentMediaTime function is provided as a convenience for querying the
* current absolute time.
*
* The conversion from parent time to local time has two stages:
*
* 1. conversion to "active local time". This includes the point at
* which the object appears in the parent's timeline, and how fast it
* plays relative to the parent.
*
* 2. conversion from active to "basic local time". The timing model
* allows for objects to repeat their basic duration multiple times,
* and optionally to play backwards before repeating. */
此外(来自属性的评论)
/* The rate of the layer. Used to scale parent time to local time, e.g.
* if rate is 2, local time progresses twice as fast as parent time.
* Defaults to 1. */
@property float speed;
/* Additional offset in active local time. i.e. to convert from parent
* time tp to active local time t: t = (tp - begin) * speed + offset.
* One use of this is to "pause" a layer by setting `speed' to zero and
* `offset' to a suitable value. Defaults to 0. */
@property CFTimeInterval timeOffset;
所以,看来你的解释是正确的。
关于iphone - "the timespace of the animation' s层”和 "in the local active time"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1168979/
他们说: The timing protocol provides the means of starting an animation a certain number of seconds int
我是一名优秀的程序员,十分优秀!