deepsea 11 maanden geleden
bovenliggende
commit
ac1f5ce271
1 gewijzigde bestanden met toevoegingen van 7 en 2 verwijderingen
  1. 7 2
      src/uwb-sample.js

+ 7 - 2
src/uwb-sample.js

@@ -158,6 +158,9 @@ function getsqlData(sdkInstance, uwbInstance) {
                 case "offline":
                   texture = textureOffline;
                   break;
+                default:
+                  texture = textureOffline;
+                  break;
               }
             } else {
               texture = textureOffline;
@@ -166,8 +169,7 @@ function getsqlData(sdkInstance, uwbInstance) {
 
             // 创建精灵对象
             let spriteMaterial = new THREE.SpriteMaterial({
-              map: texture,
-              color: 0x4AB22E
+              map: texture
             });
             let sprite = new THREE.Sprite(spriteMaterial);
             sprite.userData = customData;
@@ -298,6 +300,9 @@ function getsqlData(sdkInstance, uwbInstance) {
                 case "offline":
                   texture = textureOffline;
                   break;
+                default:
+                  texture = textureOffline;
+                  break;
               }
             } else {
               texture = textureOffline;