From ebf9cfc3356374e18987b2d5c003f75f215d29b9 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 17 八月 2024 11:11:52 +0800
Subject: [PATCH] #
---
src/components/ctrl.jsx | 4 +++-
src/store/index.js | 1 +
src/pages/fiber.jsx | 2 +-
3 files changed, 5 insertions(+), 2 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]}
/>
diff --git a/src/pages/fiber.jsx b/src/pages/fiber.jsx
index 47f6faf..7f6bfee 100644
--- a/src/pages/fiber.jsx
+++ b/src/pages/fiber.jsx
@@ -33,7 +33,7 @@
<Help />
</Canvas>
<Left />
- <Right />
+ {/* <Right /> */}
</div>
)
diff --git a/src/store/index.js b/src/store/index.js
index 8e120b7..6f875cd 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -5,6 +5,7 @@
{
text: 'Hello World',
shelfList: {},
+ autoRotate: false,
autoCruise: false,
lookAt: { x: 0, y: 0, z: 0 },
cruiseAgvNo: '2',
--
Gitblit v1.9.1