pmndrs / gltfjsx

🎮 Turns GLTFs into JSX components
https://gltf.pmnd.rs
MIT License
4.5k stars 293 forks source link

TypeScript issue on gltf models with animations. #60

Closed Code47X closed 3 years ago

Code47X commented 3 years ago

Not sure if Drei has changed useAnimations recently, but there seems to be a typescript error with the default gltf-jsx output for models with animations.

image

image

drcmda commented 3 years ago

could you fix it and make it a pr? i don't know enough ts to really do anything about it.

Code47X commented 3 years ago

It seems like just typecasting the group ref as MutableRefObject<THREE.Object3D> does the trick.

image