Hello, I was trying to get the hello world example in the README up and running in a basic typescript setup and seem to be getting some type mismatches on the ref object returned by the hooks. react-three-fiber elements seem to expect refs to the derived class (e.g. RefObject<Mesh>) and not to the base Object3D.
As far as I can tell, I have the correct dependency versions of everything. I am able to get around this issue by using the fwdRef arg and passing an explicit reference to the Three JS element I am using, but (assuming this is an actual issue and not just an issue with my setup), I was wondering how hard it would be for the hooks to take a generic that extends Object3D rather than always returning the base RefObject<Object3D>
Great work by the way, loving the library so far :)
Minimal reproduce: https://codesandbox.io/s/recursing-feather-efyxq0?file=/src/Index.tsx
Hello, I was trying to get the hello world example in the README up and running in a basic typescript setup and seem to be getting some type mismatches on the ref object returned by the hooks.
react-three-fiber
elements seem to expect refs to the derived class (e.g.RefObject<Mesh>
) and not to the baseObject3D
.As far as I can tell, I have the correct dependency versions of everything. I am able to get around this issue by using the
fwdRef
arg and passing an explicit reference to the Three JS element I am using, but (assuming this is an actual issue and not just an issue with my setup), I was wondering how hard it would be for the hooks to take a generic that extendsObject3D
rather than always returning the baseRefObject<Object3D>
Great work by the way, loving the library so far :)