xzw 2 jaren geleden
bovenliggende
commit
39da8af39f
2 gewijzigde bestanden met toevoegingen van 7 en 10 verwijderingen
  1. 2 5
      public/package/js/label.js
  2. 5 5
      public/package/js/objViewer.js

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

@@ -61,7 +61,7 @@ class Label2D extends THREE.EventDispatcher {
     }
 
 
-    updateShelter
+     
 
  
     update(e={}) {
@@ -78,10 +78,7 @@ class Label2D extends THREE.EventDispatcher {
 
         //判断label是否被模型遮挡,遮挡则消失(如果是漫游模式最好提前计算visiblePanos)
     
-    
-    
-            
-    
+     
        /*  if (e.changeSlightly) {//防卡: 画面要停止转动时才执行
             if (this.shelterByModel && convertTool.ifShelter(this.position, p.vector, viewer.camera, viewer.model.children, 0.05)) {
                 this.sheltered = true

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

@@ -106,7 +106,7 @@ Viewer.prototype.hasChanged = function () {//判断画面是否改变了,改
 
     if (!this.previousState) {
         copy()
-        return { cameraChanged: !0, changeSlightly: !1 };
+        return { cameraChanged: !0/* , changeSlightly: !1 */ };
     }
     var cameraChanged =
         !this.camera.projectionMatrix.equals(this.previousState.projectionMatrix) ||
@@ -115,14 +115,14 @@ Viewer.prototype.hasChanged = function () {//判断画面是否改变了,改
 
 
     //var changed = cameraChanged //|| !this.mouse.equals(this.previousState.mouse)  
-    let changeSlightly
+    /* let changeSlightly
     if (cameraChanged) {
         changeSlightly = math.closeTo(this.camera.position, this.previousState.position, 1e-2) &&
             math.closeTo(this.camera.quaternion, this.previousState.quaternion, 1e-3)
-    }
+    } */
     copy()
 
-    return { cameraChanged, changeSlightly };
+    return { cameraChanged/* , changeSlightly  */};
 }
 
 Viewer.prototype.setSize = function () {
@@ -167,7 +167,7 @@ Viewer.prototype.animate = function () {
 
     let changed = this.hasChanged()
     if (changed.cameraChanged) {
-        this.dispatchEvent({ type: 'view.changed', changeSlightly: changed.changeSlightly })
+        this.dispatchEvent({ type: 'view.changed'/* , changeSlightly: changed.changeSlightly */ })
         delayNeedUpdated = true
         
         if( !transitions.funcs.some(function (e) { return e.name === 'cameraFly' })){