直播系统源码,云朵左右移动循环动画实现
组件
<image class="yun3 aniYunImg" :animation="animationYunData" :src="yun1"></image>
JS
data() {
return {
animationYunData: {},
}
},
onLoad(option) {
this.animation_yun_load()
},
methods: {
animation_yun_load() {
var ani_start_time = 5000;
var animation = uni.createAnimation({
duration: ani_start_time,
delay: 1
})
var next = true;
setInterval(() => {
if (next) {
animation.translateX(20).step()
} else {
animation.translateX(-20).step()
}
next = !next;
this.animationYunData = animation.export()
}, ani_start_time)
},
},
以上就是直播系统源码,云朵左右移动循环动画实现, 更多内容欢迎关注之后的文章
标签:动画,云朵,animation,next,直播,源码 From: https://www.cnblogs.com/yunbaomengnan/p/17171604.html