We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Awesome work here, great library!. Now to the issue:
three
@react-three/fiber
@react-three/drei
node
npm
yarn
Gizmo helper with camera controls throws error on tween camera call
... <CameraControls ref={ref} makeDefault/> ... <GizmoHelper alignment="bottom-right" margin={[80, 80]} > <GizmoViewcube /> </GizmoHelper>
A workaround is, but if this could work out of the box would be awesome or that event have the direction of the clicked face or edge
function Gizmo() { const { scene, controls } = useThree(); const tweenCamera = (position: Vector3) => { const point = new Spherical().setFromVector3( new Vector3(position.x, position.y, position.z) ); // @ts-ignore controls.rotateTo(point.theta, point.phi, true); // @ts-ignore controls.fitToSphere(getBoundingSphere(scene), true); }; return ( <GizmoHelper margin={[80, 80]} alignment={'top-right'}> <GizmoViewcube onClick={(e) => { e.stopPropagation(); if ( e.eventObject.position.x === 0 && e.eventObject.position.y === 0 && e.eventObject.position.z === 0 ) { tweenCamera(e.face.normal); } else { tweenCamera(e.eventObject.position); } return null; }} /> </GizmoHelper> ); }
The text was updated successfully, but these errors were encountered:
fix: GizmoViewcube
96b5f34
see pmndrs/drei#1399
🎉 This issue has been resolved in version 9.111.2 🎉
The release is available on:
Your semantic-release bot 📦🚀
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Awesome work here, great library!. Now to the issue:
three
version: "^0.149.0"@react-three/fiber
version: "^8.12.0"@react-three/drei
version: "^9.65.2"node
version: v18.14.2npm
(oryarn
) version: npm 9.5.0Problem description:
Gizmo helper with camera controls throws error on tween camera call
Relevant code:
Workaround solution:
A workaround is, but if this could work out of the box would be awesome or that event have the direction of the clicked face or edge
The text was updated successfully, but these errors were encountered: