#
luxiaotao1123
2024-08-17 afbd08deb5101d2f2ff97f66f4388162f38860a2
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)