2013-01-23 39 views

回答

0

很高兴看到你找到你的解决方案:) 您可以找到cgscenegraph网站上一个完整的例子: http://gwennaelbuchet.github.com/cgSceneGraph/examples/03_Animation/animation_01_SRT/index.html

有相关的动画还有其他的例子:http://gwennaelbuchet.github.com/cgSceneGraph/examples.html

你有什么了解动画引擎是为每个要生成动画的情侣节点+属性生成一个时间轴。正是这个时间表提供了与动画相关的事件。

下面是一个例子,以获得一个时间轴的onAnimationEnd:

this.sceneGraph.getTimeline(myNode, "rotation.angle").onAnimationEnd = function (event) { 
    console.log("animation ended"); 
}; 

要获得onAnimationStart或onAnimate事件,这是完全一样的:)

希望这可以帮助。

0

好吧,我发现我想要什么,

有一个名为“onAnimationEnd”成在动画结束时触发的CGSGTimeline类属性,所以我有我的回调函数;)

有关信息,还有其他回调函数,如cGSceneGraph框架中的“onAnimate”&“onAnimationStart”。 链接到http://gwennaelbuchet.github.com/cgSceneGraph/api.html

最好的问候。

相关问题