#
luxiaotao1123
2024-05-05 d41e1236ab68c9dce2e66e1f7ef1182c9424d17f
#
1个文件已修改
19 ■■■■ 已修改文件
src/components/agv.jsx 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/agv.jsx
@@ -5,7 +5,13 @@
import Box from './box';
import * as Common from '../utils/common';
import * as TWEEN from "@tweenjs/tween.js";
import { INTERVAL_TIME, MODEL_AGV_SCALE } from '@/config/setting'
import {
    INTERVAL_TIME,
    MODEL_AGV_SCALE,
    REAL_COMPARE_MAP_SCALE,
    REAL_COMPARE_MAP_OFFSET_X,
    REAL_COMPARE_MAP_OFFSET_Z,
} from '../config/setting'
const Agv = (props) => {
    const { agvNo, position, theta, height, loaderTheta, forkLength, trayList, hasBox } = props;
@@ -22,10 +28,15 @@
        }
        // group position
        // const pos = {
        //     x: position?.[0],
        //     y: position?.[1],
        //     z: position?.[2],
        // }
        const pos = {
            x: position?.[0],
            y: position?.[1],
            z: position?.[2],
            x: position?.[0] * REAL_COMPARE_MAP_SCALE + REAL_COMPARE_MAP_OFFSET_X,
            y: position?.[1] * REAL_COMPARE_MAP_SCALE,
            z: position?.[2] * REAL_COMPARE_MAP_SCALE + REAL_COMPARE_MAP_OFFSET_Z,
        }
        if (!Common.deepEqual(groupPos, pos)) {
            new TWEEN.Tween(groupPos)