const animation = wx.createAnimation({
duration: 1000,
timingFunction: 'ease-in-out'
});
this.animation = animation;
animation.rotate(180).step();
this.setData({
animationIcon: animation.export()
})
var n = 0;
setInterval(function() {
n = n + 1;
this.animation.rotate(180 * (n + 1)).step()
this.setData({
animationIcon: this.animation.export()
})
}.bind(this), 3000)
我就是想做个3秒旋转一圈的沙漏动画,在模拟上是正常的,3秒会转180
本文网址:http://www.91bianli.com/weixinxiaochengxu/19913.html