CNode

zrender animate 无法针对rotation做动画操作,有遇到过这种情况的朋友吗

问答
Xxumjs8623发布于7 年前最后回复7 年前0 回复5300 浏览0 收藏
 	this.zr = zrender.init(this.$refs.finger);
    let circle1 = new zrender.Rect({
      rotation: 0,
      origin: [80, 80],
      shape: {
        x: 30,
        y: 30,
        width: 100,
        height: 100
      },
      style: {
        fill: "#FF6EBE",
        stroke: "#FF6EBE"
      },
      silent: true
    });
    circle1.animateTo({
      rotation: Math.PI * 2
    }, 1000, 0)
    circle1.animate('rotation',true)
      .when(1000, 2)
      .start()
    this.zr.add(circle1);

第一个 animateTo 可以正常运行,第二个animate就会报错 image.png

查看回复

回复 (0)

暂无回复,成为第一个参与讨论的人。
参与回复
登录后即可参与回复。登录