在自动播放启动之前,请更改Lottie Web速度,方向等?
我已经使用设置了Lottie动画,让Myanimation = Lottie.loadAnimation
。我需要它将autoplay
属性设置为true。
我想将速度更改为 2x 。我可以使用myanimation.setspeed(2)
来做到这一点。 我如何保证此速度更改 自动播放启动(应该在组件加载后立即发生)。
除了手动stop()
,配置,然后start()
,我还能做什么?
I've set up my Lottie animation using let myAnimation = lottie.loadAnimation
. I need it to have the autoplay
attribute set to true.
I want to change the speed to 2x. I can do this using myAnimation.setSpeed(2)
.
How can I guarantee this speed change before the autoplay kicks in (which is supposed to happen right after the component loads).
Is there anything I can do besides manually stop()
, configure, and then start()
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论