动画在Three.js完成的事件?

时间:2015-05-04 19:08:50

标签: three.js

我有一些我想要一个接一个地运行的动画。我怎么知道什么时候完成,以便我知道开始下一个?

更新抱歉,我应该提到这些是我正在做的骨骼动画。

2 个答案:

答案 0 :(得分:1)

Couple of options:

1: You can enclose your animations in setTimeout() functions:

setTimeout( function() { animation1; }, waitTime );
setTimeout( function() { animation2; }, waitTime + duration_of_animation1 );
setTimeout( function() { animation3; }, waitTime + duration_of_animation2 );

2: Look at https://github.com/mrdoob/frame.js which has not been released yet.

答案 1 :(得分:0)

对于动画尝试使用补间库,它解决的不仅仅是:

https://github.com/tweenjs/tween.js/