From afbd08deb5101d2f2ff97f66f4388162f38860a2 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 17 八月 2024 11:21:55 +0800
Subject: [PATCH] #
---
src/components/agv.jsx | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/src/components/agv.jsx b/src/components/agv.jsx
index a7ee415..73e1d51 100644
--- a/src/components/agv.jsx
+++ b/src/components/agv.jsx
@@ -5,6 +5,7 @@
import Box from './box';
import * as Common from '../utils/common';
import * as TWEEN from "@tweenjs/tween.js";
+import { useStore } from '@/store';
import {
INTERVAL_TIME,
MODEL_AGV_SCALE,
@@ -171,6 +172,17 @@
const [loaderAngle, setLoaderAngle] = useState(0);
const [forkDis, setForkDis] = useState(0);
const [realTrayList, setRealTrayList] = useState([]);
+ const store = useStore();
+
+ useEffect(() => {
+ if (store.autoCruise && agvNo === store.cruiseAgvNo) {
+ // store.lookAt = groupPos;
+
+ store.lookAt.x = groupPos.x;
+ store.lookAt.y = loaderHeight;
+ store.lookAt.z = groupPos.z;
+ }
+ }, [groupPos, loaderHeight])
useEffect(() => {
if (!props || Object.keys(props).length === 0) {
@@ -208,7 +220,7 @@
}
// loader height
- if (loaderHeight !== height && props.height !== null) {
+ if (loaderHeight !== height && props.height !== null && props.height > 1) {
new TWEEN.Tween({ value: loaderHeight })
.to({ value: height }, INTERVAL_TIME)
.easing(TWEEN.Easing.Linear.None)
--
Gitblit v1.9.1