Closed nene closed 8 months ago
I see a suspicious typescript comment in DragControls.tsx:
// @ts-expect-error new in @react-three/fiber@7.0.5
const defaultControls = useThree((state) => state.controls) as ControlsProto
I can successfully use the PivotControls
without any errors, so I think I don't have a fundamental issue with my setup. It must be something specific about DragControls
.
I patched the DragControls component by wrapping the following lines:
defaultControls.enabled = false;
with null checks:
if (defaultControls) {
defaultControls.enabled = false;
}
Though I have no idea what other implications this change might have. But at least it eliminates the null exceptions.
:tada: This issue has been resolved in version 9.99.4 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Awesome! Thanks a lot!
three
version: 0.161.0@react-three/fiber
version: 8.15.16@react-three/drei
version: 9.99.3node
version: 20.8.0npm
version: 10.1.0Problem description:
I tried to use the
DragControls
component. As I understand, I just need to wrap amesh
inside it.The dragging actually works, but in browser console I see an error:
Relevant code:
I must be doing something obvious very wrong, but I have no idea what I must be missing.