#
luxiaotao1123
2024-04-23 1c0347c32b3f20c9eb4b482b1535ff8a1e9518c3
#
3个文件已修改
12 ■■■■ 已修改文件
src/assets/data/agv.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/agv.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/common.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/data/agv.js
@@ -27,7 +27,7 @@
        {
            no: 1,
            position: [100, 0, 0],
            theta: 90,
            theta: 270,
            height: 100,
            loaderTheta: 180,
            forkLength: 0,
src/components/agv.jsx
@@ -42,8 +42,9 @@
        // group theta
        if (groupTheta !== theta) {
            const minTheta = Common.minDiffTheta(groupTheta, theta);
            new TWEEN.Tween({ value: groupTheta })
                .to({ value: theta }, INTERVAL_TIME)
                .to({ value: minTheta }, INTERVAL_TIME)
                .easing(TWEEN.Easing.Linear.None)
                .onUpdate((e) => {
                    setGroupTheta(e.value)
src/utils/common.js
@@ -19,7 +19,12 @@
}
export const rotationParseNum = (num) => {
    return num * Math.PI / 180;
    const normalizedDegrees = num % 360;
    return normalizedDegrees * Math.PI / 180;
}
export const minDiffTheta = (originTheta, targetTheta) => {
    return (targetTheta - originTheta > 180) ? targetTheta - 360 : targetTheta;
}
export const setShadow = (obj) => {