I've finally fixed a longstanding bug with animations in my engine! If I don't make Blender sample animations at each frame when exporting to glTF, they looked funny and really wonky. Turned out I missed one term in cubic spline interpolation formula 🙃
I've also added some preprocessing code that flips rotation quaternions so that two successive keyframes are always on the same hemisphere. Is this something people actually do?
Here's the fix, btw. `td` is the duration between two input keyframes.