种一颗树,最好的时机是十年期,而后是现在。
The best time to plant a tree was twenty years ago. The second-best time is now.
在微信小程序中,提供了这样一个API——wx.createAnimation(Object object)。该API创建一个动画实例 animation。调用实例的方法来描述动画。
本文主要介绍animation实例的平移相关的方法及其使用。
假设我们创建了这样一个实例:
this.animationData = wx.createAnimation({
duration: 1000
})
1. Animation.translate(number tx, number ty) 平移变换
参数:
number tx
当仅有该参数时表