Animation.matrix

解释: 同transform-function matrixAnimation.matrix - 图1

方法参数

Number a,Number b,Number c,Number d

示例

在开发者工具中预览效果

扫码体验

Animation.matrix - 图2请使用百度APP扫码

图片示例

Animation.matrix - 图3

Animation.matrix - 图4

Animation.matrix - 图5

代码示例

  1. <view class="wrap">
  2. <view class="animation-element-wrapper">
  3. <view class="animation-element" animation="{{animation}}"></view>
  4. </view>
  5. <view class="card-area">
  6. <view class="top-description border-bottom">展示动画</view>
  7. <button type="primary" bindtap="matrix">matrix</button>
  8. </view>
  9. </view>
  1. Page({
  2. data:{ },
  3. onReady() {
  4. this.animation = swan.createAnimation({
  5. transformOrigin: "50% 50%",
  6. duration: 1000,
  7. timingFunction: "ease",
  8. delay: 0
  9. })
  10. },
  11. matrix() {
  12. this.animation.matrix(1, 2, 2, 1, 20, 20).step()
  13. this.setData({animation: this.animation.export()})
  14. }
  15. });