Animation.rotateZ

    Number deg,deg的范围-180~180,在Z轴旋转一个 deg 角度。

    示例

    请使用百度APP扫码

    Animation.rotateZ - 图3

    1. onReady() {
    2. this.animation = swan.createAnimation({
    3. transformOrigin: "50% 50%",
    4. timingFunction: "ease",
    5. delay: 0
    6. },
    7. this.animation.rotateZ(Math.random() * 720 - 360).step()
    8. this.setData({animation: this.animation.export()})
    9. }
    10. });