xzw 1 год назад
Родитель
Сommit
c4f37f317b
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      src/viewer/NavigationCube.js

+ 3 - 1
src/viewer/NavigationCube.js

@@ -748,7 +748,9 @@ class NavCubeViewer extends ViewerBase{
         this.renderer.render(this.scene, this.camera)
     }
 
-    update(delta){     
+    update(delta){ 
+        if(this.renderArea.clientWidth <= 0) return //unvisible
+    
         this.updateScreenSize() 
         this.controls.update(delta)
         this.view.applyToCamera(this.camera)