I'll definitely need to spend some more time playing with and learning from all of the existing solutions
I'll definitely need to spend some more time playing with and learning from all of the existing solutions
Key points:
* if you use the JSON loader, the animation data is in an "animations" array hanging off the geometry object
* you need to create an AnimationMixer and pass the elements of the animations array into its "clipAction" method to register these animations with it
* to animate a mesh, you need to construct a SkinnedMesh rather than a regular Mesh
* you then also need to call the AnimationMixer's "clipAction" method again (for a different purpose this time), giving it the name of the animation and the mesh you want to animate
* every frame, you need to call your AnimationMixer's "update()" method.
(I used this as part of my last couple of Ludum Dare entries - https://github.com/matt-williams/ld36/ and https://github.com/matt-williams/ld37/.)
Feel free to ask if you hit any problems and I'll try to answer, although I wouldn't call myself an expert on this!