[web]pag分段播放问题 #1520
-
如何设置播放指定范围的动画?如动画时长4s,播放完成一轮后,再继续循环播放1s ~ 2.5s间的动画。 // 实例化 PAG // ----------------分段播放-------------------- // 将画布尺寸设置为 PAGFile的尺寸 其中setDuration(1.510001000)成功了,通过pagFile.startTime()得到的值是1000000us,但是动画仍然是从0开始的,运行起来似乎没有任何影响。
之所以有这个问题,是因为之前用lottie的时候用过分段播放; lottie通过通过lottieObj.playSegments()设置[开始帧, 结束帧],就能达到分段播放的目的。
最终demo代码: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
The above content was transferred from a legacy post on the PAG forum |
Beta Was this translation helpful? Give feedback.
The above content was transferred from a legacy post on the PAG forum
以上内容搬运来自 PAG 论坛的历史帖子