(GLTFExporter) How do I properly attach animations to GLTF and export

hi guys https://codesandbox.io/s/react-three-fiber-vrm-dnd-fbx-anima-apply-to-vrm-export-to-gltf-m2d4bl?file=/src/utils/Export.js

I have encountered another problem about exporting GLTF with animation. There are few related posts on the Internet, so I have to come here to ask (if it is inappropriate, I can delete it)

I have a website built using react-three-fiber to help general users drag mixamo animation (.FBX) and character model (.vrm as GLTF) models onto the page and combine them to export as .GLTF

I can currently export GLTF with { animation , model, single frame motion }
but can’t play
On Blender, I found that there is indeed animation data and skeleton, but the two are separated…
I have no clue about the cause and solution of this

Although I saw an idea provided by donmccurdy, I am not sure how to apply this method,But I’ve done this and still can’t export properly


new THREE.QuaternionKeyframeTrack(
              track.values.map((v, i) => (vrm.meta?.metaVersion === '0' && i % 2 === 0 ? -v : v))

I have successfully combined animated animations from FBX with VRM gltf models in the scene and it works

But no matter how I try to export it, it will become GLFT with animation data, but the two are not played together. I suspect that it is a problem with the keyFrame, but I have no idea how to deal with it. The information in the file is a bit lacking or I have not understood it correctly.

My The codesandbox is here:

Whether it is discussion, suggestion, idea, or solution, all are welcome, and I am very grateful


avatar_scene node name