0

这个问题是特定于命运之轮的例子。作为 javascript 的新手,我设法更改了楔形的数量、颜色和标签,但我无法将函数绑定到旋转动画的结束事件。这将是一个关于冒险行为的小型心理学实验,我需要确定在轮换结束时哪个楔子达到了标记。

4

1 回答 1

1

这直接来自 Konva JS 文档...

// the tween has to be created after the node has been added to the layer
var tween = new Konva.Tween({
    node: wheel,
    duration: 4,
    rotation: 360,
    easing: Konva.Easings.BackEaseOut,
    onFinish: function() {
        writeMessage('tween finished!');
    }
});

Konva JS Tween 完成事件

于 2017-03-16T21:07:54.970 回答