From 9d71e24e7982f6915e5f832512925bee9b245f35 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 20 八月 2024 16:13:26 +0800
Subject: [PATCH] #

---
 src/components/ctrl.jsx |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/components/ctrl.jsx b/src/components/ctrl.jsx
index eb25dc5..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,7 +31,7 @@
                 {/* <CameraControls ref={controlsRef} /> */}
                 <OrbitControls
                     ref={controlsRef}
-                    autoRotate
+                    autoRotate={store.autoRotate}
                     autoRotateSpeed={0.5}
                     target={[-200, 100, 0]}
                 />

--
Gitblit v1.9.1