在自动播放启动之前,请更改Lottie Web速度,方向等?

发布于 2025-01-22 06:20:58 字数 296 浏览 1 评论 0原文

我已经使用设置了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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文