Rig is damaged after exporting to JSON

Hey folks,

i have following problem:

I modelled a small Ninja in blender and added a human rig and some animations to it. Now I want to export that model including its animations into JSON Format so i can load it with three.js and watch it in my browser. I have the code set up already and its working fine, but when i import my ninja.js and play the animations, for some reason my rig is totally messed up.

I added a skeleton helper so you can see how my model behaves in relation to the rig. For me it looks like there are missing two bones at the legs.

demo: http://demo.martenzander.com/

To make sure it’s not a coding problem I am struggling with, I made a test project where i animated a cube with two bones. The animation is fine and the model behaves exactly how it should. So I came to the conclusion it must be a problem in blender.