| | |
| | | } from '../config/setting' |
| | | |
| | | const Agv = (props) => { |
| | | const { agvNo, position, theta, trayList, hasBox } = props; |
| | | const { agvNo, position, trayList, hasBox } = props; |
| | | const theta = -props.theta; |
| | | const height = props.height * 0.04; |
| | | const forkLength = props.forkLength * 0.1; |
| | | const loaderTheta = Number(props.loaderTheta?.toFixed(1)); |
| | |
| | | } |
| | | |
| | | // group theta |
| | | if (groupTheta !== -theta && props.theta !== null) { |
| | | const minTheta = Common.minDiffTheta(groupTheta, -theta); |
| | | if (groupTheta !== theta && props.theta !== null) { |
| | | const minTheta = Common.normalizeAngle(theta); |
| | | new TWEEN.Tween({ value: groupTheta }) |
| | | .to({ value: minTheta }, INTERVAL_TIME) |
| | | .easing(TWEEN.Easing.Linear.None) |
| | |
| | | // console.log("loaderTheta", loaderTheta); |
| | | // console.log("loaderAbsoluteAngle", loaderAbsoluteAngle); |
| | | if (integrateTheta !== loaderAbsoluteAngle && props.loaderTheta !== null) { |
| | | const minTheta = Common.normalizeAngle(loaderAbsoluteAngle); |
| | | // const minTheta = Common.minDiffTheta(integrateTheta, loaderAbsoluteAngle); |
| | | new TWEEN.Tween({ value: integrateTheta }) |
| | | .to({ value: loaderAbsoluteAngle }, INTERVAL_TIME) |
| | | .to({ value: minTheta }, INTERVAL_TIME) |
| | | .easing(TWEEN.Easing.Linear.None) |
| | | .onUpdate((e) => { |
| | | setIntegrateTheta(e.value) |