#
luxiaotao1123
2024-04-23 1227bd8858e552ddae3f9cca3e4bdf0996f002c5
#
2个文件已修改
21 ■■■■■ 已修改文件
src/components/agv.jsx 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/warehouse.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/agv.jsx
@@ -18,12 +18,6 @@
        if (!props || Object.keys(props).length === 0) {
            return;
        }
        console.log(props);
        const pos = {
            x: props.position[0],
            y: 0,
            z: props.position[2],
        }
        // new TWEEN.Tween(coords)
        //     .to(pos, INTERVAL_TIME)
        //     .easing(TWEEN.Easing.Linear.None)
@@ -36,6 +30,10 @@
    useFrame((state, delta) => {
        TWEEN.update();
        setGroupPos(preState => ({
            ...preState,
            x: preState.x + 1
        }))
    })
    const bodyModel = useMemo(() => {
@@ -62,17 +60,12 @@
        return fbx.clone();
    }, [])
    useEffect(() => {
    }, []);
    return (
        <>
            <group
                rotation-y={Common.rotationParseNum(theta)}
                scale={0.5}
                position={position}
                position={[groupPos.x, groupPos.y, groupPos.z]}
            >
                <primitive object={bodyModel} castShadow />
                <primitive object={loaderModel} castShadow position={[0, 100, 0]} />
src/core/warehouse.jsx
@@ -22,7 +22,9 @@
    useEffect(() => {
        const timer = setInterval(() => {
            const agvRealData = agvRealDataList[index];
            setAgvData(agvRealData);
            if (agvRealData) {
                setAgvData(agvRealData);
            }
            index++;
        }, 1000);