| | |
| | | // path |
| | | drawPreTravelPath(shuttleVo.preTravelPath, shuttleVo.shuttleNo, curFloor); |
| | | // shuttle |
| | | const shuttle = querySprite(SENSOR_TYPE.SHUTTLE, shuttleVo.shuttleNo); |
| | | if (!shuttle && !shuttleVo.curLocNo) { continue; } |
| | | const { row, bay, lev } = parseLocNo(shuttleVo.curLocNo); |
| | | const shelf = querySprite(SENSOR_TYPE.SHELF, row + '-' + bay); |
| | | if (!shelf) { continue; } |
| | | |
| | | new TWEEDLE.Tween(shuttle?.position).easing(TWEEDLE.Easing.Linear.None).to({ |
| | | x: shelf.position.x, |
| | | y: shelf.position.y |
| | | }, 1000).onUpdate(() => { |
| | | updateEffect(shuttle); |
| | | }).start(); |
| | | showShuttle(shuttleVo.shuttleNo, shuttleVo.curLocNo, curFloor); |
| | | } |
| | | } |
| | | |
| | | |
| | | export const drawPreTravelPath = (path, shuttleNo, curFloor) => { |
| | | if (!mapContainer) { |
| | |
| | | } |
| | | } |
| | | mapContainer.addChild(pathLine); |
| | | } |
| | | |
| | | export const showShuttle = (shuttleNo, curLocNo, curFloor) => { |
| | | if (!curLocNo) { return } |
| | | const { row, bay, lev } = parseLocNo(curLocNo); |
| | | if (Number(lev) !== curFloor) { return } |
| | | |
| | | const shuttle = querySprite(SENSOR_TYPE.SHUTTLE, shuttleNo); |
| | | if (!shuttle) { return } |
| | | |
| | | const shelf = querySprite(SENSOR_TYPE.SHELF, row + '-' + bay); |
| | | if (!shelf) { return } |
| | | |
| | | new TWEEDLE.Tween(shuttle?.position).easing(TWEEDLE.Easing.Linear.None).to({ |
| | | x: shelf.position.x, |
| | | y: shelf.position.y |
| | | }, 1000).onUpdate(() => { |
| | | updateEffect(shuttle); |
| | | }).start(); |
| | | } |