xzw 2 anos atrás
pai
commit
a3dafd6098
2 arquivos alterados com 4 adições e 4 exclusões
  1. 2 2
      public/package/js/label.js
  2. 2 2
      public/package/js/objViewer.js

+ 2 - 2
public/package/js/label.js

@@ -59,12 +59,12 @@ class Label2D extends THREE.EventDispatcher {
 
         //判断label是否被模型遮挡,遮挡则消失(如果是漫游模式最好提前计算visiblePanos)
 
-        if (e.changeSlightly){
+        if (e.changeSlightly){//防卡: 画面要停止转动时才执行
             if (this.shelterByModel && convertTool.ifShelter(this.position, p.vector, viewer.camera, viewer.model.children, 0.05)) {
                 this.elem.css('display', 'none'); return;
             }
         }else{
-            //console.log('not changeSlightly')
+            //console.log('changeSlightly')
         }
          
 

+ 2 - 2
public/package/js/objViewer.js

@@ -117,8 +117,8 @@ Viewer.prototype.hasChanged = function () {//判断画面是否改变了,改
     //var changed = cameraChanged //|| !this.mouse.equals(this.previousState.mouse)  
     let changeSlightly
     if(cameraChanged){
-        changeSlightly = math.closeTo(this.camera.position,this.previousState.position, 1e-3) &&
-            math.closeTo(this.camera.quaternion,this.previousState.quaternion, 1e-4) 
+        changeSlightly = math.closeTo(this.camera.position,this.previousState.position, 1e-2) &&
+            math.closeTo(this.camera.quaternion,this.previousState.quaternion, 1e-3) 
     }
     copy()