From 4bef71e0cf39ab5f2db45c147d6ab7bbc80e756c Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期二, 20 八月 2024 16:06:14 +0800 Subject: [PATCH] # --- src/components/ctrl.jsx | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/ctrl.jsx b/src/components/ctrl.jsx index 372e3bd..88a6458 100644 --- a/src/components/ctrl.jsx +++ b/src/components/ctrl.jsx @@ -9,10 +9,12 @@ MapControls, } from '@react-three/drei'; import { useThree, useFrame } from '@react-three/fiber'; +import { useStore } from '@/store'; const Controls = (props) => { const controlsRef = useRef(); const [choiceCtrls, setChoiceCtrls] = useState(false); + const store = useStore(); useEffect(() => { if (props.fly) { @@ -29,8 +31,9 @@ {/* <CameraControls ref={controlsRef} /> */} <OrbitControls ref={controlsRef} - autoRotate - autoRotateSpeed={0.2} + autoRotate={store.autoRotate} + autoRotateSpeed={0.5} + target={[-200, 100, 0]} /> {/* <PointerCtrl /> */} </group> -- Gitblit v1.9.1