|
@@ -289,7 +289,11 @@ function getsqlData(sdkInstance, uwbInstance) {
|
|
|
let textureLoader = new THREE.TextureLoader();
|
|
|
let benchList = window.store ? window.store.getters['benchList/getBenchList'] : [];
|
|
|
let currentBench = benchList.find(b => b.id == bench_id);
|
|
|
- let texture = textureLoader.load('../images/location_'+(currentBench.status || 'offline')+'.png');
|
|
|
+ let purl = '../images/location_offline.png';
|
|
|
+ if (currentBench && currentBench.status) {
|
|
|
+ purl = '../images/location_'+(currentBench.status || 'offline')+'.png'
|
|
|
+ }
|
|
|
+ let texture = textureLoader.load(purl);
|
|
|
|
|
|
// 创建精灵对象
|
|
|
let spriteMaterial = new THREE.SpriteMaterial({
|