| | |
| | | DEVICE_TYPE, |
| | | DEVICE_Z_INDEX, |
| | | AGV_STATUS_MODE, |
| | | DEVICE_SPRITE_TINT, |
| | | DEVICE_SELECTED_EFFECT_PADDING, |
| | | DEVICE_SELECTED_EFFECT_COLOR, |
| | | } from './constants'; |
| | | |
| | | import shelf from '/map/shelf.svg'; |
| | |
| | | default: |
| | | break; |
| | | } |
| | | DEVICE_SPRITE_TINT[deviceType] != null && (sprite.tint = DEVICE_SPRITE_TINT[deviceType]); |
| | | |
| | | if (sprite && deviceType !== DEVICE_TYPE.AGV) { |
| | | // sprite.blendMode = PIXI.BLEND_MODES.MULTIPLY; |
| | | sprite.blendMode = PIXI.BLEND_MODES.MULTIPLY; |
| | | } |
| | | return sprite; |
| | | } |
| | |
| | | const maxDimension = Math.max(width, height); |
| | | const radius = (maxDimension / 2) + (DEVICE_SELECTED_EFFECT_PADDING[sprite.data?.type] || 10); |
| | | |
| | | const color = themeMode === 'light' ? '#40739e' : '#718093'; |
| | | let color; |
| | | const spriteEffectColor = DEVICE_SELECTED_EFFECT_COLOR[sprite.data?.type]; |
| | | if (spriteEffectColor) { |
| | | color = spriteEffectColor; |
| | | } else { |
| | | color = themeMode === 'light' ? '#747d8c' : '#718093'; |
| | | } |
| | | |
| | | const alpha = 1; |
| | | |
| | | effectCircle = new PIXI.Graphics(); |
| | |
| | | if (!selectedSprite || !effectCircle) { |
| | | return; |
| | | } |
| | | // 更新圆的位置,确保跟随sprite |
| | | effectCircle.position.set(selectedSprite.x, selectedSprite.y); |
| | | }; |
| | | |