xzw 1 năm trước cách đây
mục cha
commit
c4f37f317b
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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)