| | |
| | | import * as TWEEDLE from 'tweedle.js'; |
| | | import { |
| | | MAP_DEFAULT_ROTATION, |
| | | MAP_MIRROR, |
| | | DEVICE_TYPE, |
| | | DEVICE_Z_INDEX, |
| | | AGV_STATUS_MODE, |
| | |
| | | return; |
| | | } |
| | | |
| | | mapContainer.scale.set(0.3); |
| | | const focusScale = 0.1; |
| | | mapContainer.scale.set(MAP_MIRROR ? -focusScale : focusScale, focusScale); |
| | | mapContainer.position.set(0, 0); |
| | | |
| | | let bounds = sprite.getBounds(); |
| | |
| | | const pointRoute = new PointRoute(POINT_ROUTE_DIRECTION[route.direction]); |
| | | pointRoute.setPoint(startPoint, endPoint); |
| | | pointRoute.clear(); |
| | | pointRoute.lineStyle(Math.max(7, 2 * (1 / mapContainer.scale.x)), themeMode === 'light' ? '#ced6e0' : '#535c68'); |
| | | pointRoute.lineStyle(Math.max(7, 2 * (1 / Math.abs(mapContainer.scale.x))), themeMode === 'light' ? '#ced6e0' : '#535c68'); |
| | | pointRoute.moveTo(startPoint.position.x, startPoint.position.y); |
| | | pointRoute.lineTo(endPoint.position.x, endPoint.position.y); |
| | | pointRoute.alpha = 1; |
| | |
| | | }); |
| | | agvText.anchor.set(0.5, 0.5); |
| | | agvText.position.set(0, 8); |
| | | agvText.scale.set(MAP_MIRROR ? -1 : 1, 1) |
| | | agvSprite.addChild(agvText); |
| | | |
| | | agvSprite.updateTextRotation = () => { |