| | |
| | | }) |
| | | |
| | | export const SENSOR_TYPE = Object.freeze({ |
| | | SHUTTLE: "SHUTTLE", |
| | | SHELF: "SHELF", |
| | | SHUTTLE: "SHUTTLE", |
| | | POINT: "POINT", |
| | | AGV: "AGV", |
| | | }) |
| | | |
| | | export const SENSOR_ZINDEX = Object.freeze({ |
| | | SHELF: 1, |
| | | POINT: 1, |
| | | SHUTTLE: 100, |
| | | AGV: 100, |
| | | }) |
| | | |
| | | export const SHELF_TYPE = Object.freeze({ |
| | |
| | | sprite = new PIXI.Sprite(PIXI.Texture.from(shuttle, { resourceOptions: { scale: 5 } })); |
| | | sprite.width = 50; |
| | | sprite.height = 50; |
| | | sprite.zIndex = 100; |
| | | sprite.zIndex = SENSOR_ZINDEX.SHUTTLE; |
| | | break; |
| | | case SENSOR_TYPE.AGV: |
| | | sprite = new PIXI.Sprite(PIXI.Texture.from(agv, { resourceOptions: { scale: 5 } })); |
| | | sprite.width = 50; |
| | | sprite.height = 50; |
| | | sprite.zIndex = 100; |
| | | sprite.zIndex = SENSOR_ZINDEX.AGV; |
| | | break; |
| | | case SENSOR_TYPE.SHELF: |
| | | sprite = new PIXI.Sprite(PIXI.Texture.from(shelf, { resourceOptions: { scale: 1 } })); |
| | | sprite.width = 60; |
| | | sprite.height = 60; |
| | | sprite.zIndex = 1; |
| | | sprite.zIndex = SENSOR_ZINDEX.SHELF; |
| | | break; |
| | | case SENSOR_TYPE.POINT: |
| | | sprite = new PIXI.Sprite(PIXI.Texture.from(point, { resourceOptions: { scale: 5 } })); |
| | | sprite.width = 10; |
| | | sprite.height = 10; |
| | | sprite.zIndex = 1; |
| | | sprite.zIndex = SENSOR_ZINDEX.POINT; |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | effectHalfCircle.endFill(); |
| | | effectHalfCircle.position.set(sprite.x, sprite.y); |
| | | effectHalfCircle.scale.set(1 / scale); |
| | | effectHalfCircle.zIndex = 9999; |
| | | |
| | | effectRectangle = new PIXI.Graphics(); |
| | | effectRectangle.lineStyle(5 * scale, color, 1); |
| | | effectRectangle.drawRoundedRect(0, 0, sideLen, sideLen, 16 * scale); |
| | | effectRectangle.endFill(); |
| | | effectRectangle.mask = effectHalfCircle; |
| | | effectRectangle.zIndex = 9999; |
| | | |
| | | const scaledWidth = sideLen * (1 / scale); |
| | | const scaledHeight = sideLen * (1 / scale); |
| | |
| | | copiedSprite.rotation = sprite.rotation; |
| | | copiedSprite.data = deepCopy(sprite.data); |
| | | copiedSprite.data.uuid = generateID(); |
| | | showSheflType(copiedSprite); |
| | | if (copiedSprite.data.type === SENSOR_TYPE.SHELF) { |
| | | showSheflType(copiedSprite); |
| | | } |
| | | return copiedSprite; |
| | | } |
| | | |
| | |
| | | label: intl.formatMessage({ id: 'map.sensor.type.shelf', defaultMessage: '货架' }) |
| | | }) |
| | | break; |
| | | case SENSOR_TYPE.SHUTTLE: |
| | | options.push({ |
| | | value: value, |
| | | label: intl.formatMessage({ id: 'map.sensor.type.shuttle', defaultMessage: '穿梭车' }) |
| | | }) |
| | | break; |
| | | case SENSOR_TYPE.AGV: |
| | | options.push({ |
| | | value: value, |