我用lottie在网页上添加了演示动画,但是播放速度太快了。怎样才能达到正常速度?下面的链接是一个问题动画。
问题动画链接:https://saybgm.github.io/Lottie_example/
我的动画:https://youtu.be/CcHT7VgUF38
After Effect aep文件:https://drive.google.com/file/d/1YGqgiuU-hU5Raq2WXu3r1ZrCANXB_Gw9/view?usp=sharing
我的代码
var animate = lottie.loadAnimation({
container: document.getElementById("hello"),
renderer: 'svg',
autoplay: true,
loop:true,
path: 'animation2.json'})发布于 2018-05-24 11:54:13
我认为问题出在动画文件内部,尝试使用Lottiefiles预览,它看起来与您的代码运行时一样:https://www.lottiefiles.com/share/TNdLkQ
如果你想让它变慢,调用setSpeed (1是当前速度,<1会让它变慢):
var animate = lottie.loadAnimation({
container: document.getElementById("hello"),
renderer: 'svg',
autoplay: true,
loop:true,
path: 'animation2.json'
});
animate.setSpeed(0.1);来自文档:http://airbnb.io/lottie/web/getting-started.html
发布于 2019-08-27 15:34:15
也可以在XML文件上处理它。转到Lottie标签,然后实现
app:lottie_speed="any number"https://stackoverflow.com/questions/50500030
复制相似问题