AnalyticalGraphicsInc / gltf-vscode

This is an extension for Visual Studio Code to add support for editing glTF files.
Apache License 2.0
460 stars 63 forks source link

Add BabylonJS animation controls #87

Closed emackey closed 6 years ago

emackey commented 6 years ago

Similar to #86 for ThreeJS.

I've found a number of Babylon tutorials that demonstrate how to programmatically create and control scene-level animations. But for this issue, I need to get the list of animations defined in a glTF that has been loaded into the Babylon scene, and be able to start, stop/reset, and re-start those animations.

@bghgary is there documentation for this that I've overlooked?

bghgary commented 6 years ago

I need to update the documentation. The glTF animations correspond to animationGroups in Babylon. I recently added a callback for animationGroups to the loader (onAnimationGroupLoaded). Let me know if you need help hooking it up. You should set animation start mode to none so that you can start the animation group that you want.

bghgary commented 6 years ago

Look at the playgrounds in https://doc.babylonjs.com/how_to/group for animationGroup usage.