3 ms·
Oh awesome and thanks a lot for the link. I'll definitely need to spend some more time playing with and learning from all of the existing solutions
by chinedufn 10y ago
Oh awesome and thanks a lot for the link.
I'll definitely need to spend some more time playing with and learning from all of the existing solutions
- maffydub 10y agoI've used the skeletal animation API (exporting from Blender). It's very cool, but the documentation isn't great (or at least wasn't last time I checked). 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/ https://github.com/matt-williams/ld36/ and https://github.com/matt-williams/ld37/. 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!