Animation.matrix
解释: 同transform-function matrix
方法参数
Number a,Number b,Number c,Number d
示例
扫码体验
请使用百度APP扫码
图片示例
代码示例
<view class="wrap">
<view class="animation-element-wrapper">
<view class="animation-element" animation="{{animation}}"></view>
</view>
<view class="card-area">
<view class="top-description border-bottom">展示动画</view>
<button type="primary" bindtap="matrix">matrix</button>
</view>
</view>
Page({
data:{ },
onReady() {
this.animation = swan.createAnimation({
transformOrigin: "50% 50%",
duration: 1000,
timingFunction: "ease",
delay: 0
})
},
matrix() {
this.animation.matrix(1, 2, 2, 1, 20, 20).step()
this.setData({animation: this.animation.export()})
}
});