| | |
| | | if (backpackCount !== prevBackpackCount || battery !== prevBattery) { |
| | | const agvStatusMode = getAgvStatusMode(backpackCount, battery); |
| | | const agvTexture = generateAgvSpriteTexture(agvStatusMode); |
| | | agvSprite.texture = PIXI.Texture.from(agvTexture, { resourceOptions: { scale: 1 } }); |
| | | agvSprite.texture = PIXI.Texture.from(agvTexture, { resourceOptions: { scale: 1 } }); // todo Uncaught TypeError: Cannot read properties of undefined (reading '_pixiId') |
| | | // update backpackCount and battery |
| | | agvSprite.data.backpackCount = backpackCount; |
| | | agvSprite.data.battery = battery; |