Переглянути джерело

Merge branch 'v1.9.0-jm' of http://192.168.0.115:3000/bill/fuse-code into v1.9.0-jm

bill 8 місяців тому
батько
коміт
4bf11c0969
3 змінених файлів з 19 додано та 10 видалено
  1. 8 6
      public/lib/potree/potree.js
  2. 1 1
      public/lib/potree/potree.js.map
  3. 10 3
      src/sdk/cover/index.js

+ 8 - 6
public/lib/potree/potree.js

@@ -17810,7 +17810,6 @@
 	        this.text = [text + ''];
 	      } else this.text = text;
 	      this.updateTexture();
-	      this.sprite.waitUpdate(); //重新计算各个viewport的matrix 
 	    }
 	  }
 	  setTextColor(color) {
@@ -17829,9 +17828,9 @@
 	    this.position.copy(pos);
 	    this.sprite.waitUpdate();
 	  }
-	  update() {
-	    this.sprite.waitUpdate();
-	  }
+	  /* update(){
+	      this.sprite.waitUpdate()
+	  } */
 	  /* setVisible(v){ 
 	      Potree.Utils.updateVisible(this, 'setVisible', v)
 	  } */
@@ -17912,7 +17911,9 @@
 	      this.sprite.material.map.dispose();
 	    }
 	    this.sprite.material.map = texture;
+	    var oldScale = this.sprite.scale.clone();
 	    this.sprite.scale.set(spriteWidth * 0.01 / r, spriteHeight * 0.01 / r, 1.0);
+	    oldScale.equals(this.sprite.scale) || this.sprite.waitUpdate(); //重新计算各个viewport的matrix 
 	  }
 	  roundRect(ctx, x, y, w, h, r) {
 	    ctx.beginPath();
@@ -42445,10 +42446,11 @@
 	        clipDistance: 10 //消失距离   
 	      }));
 	      this.titleLabel.sprite.material.depthTest = false;
-	      var line = LineDraw.createLine([new Vector3(0, 0, 0), new Vector3(0, 0, titleLineHeight)], {
+	      var line = LineDraw.createFatLine([new Vector3(0, 0, 0), new Vector3(0, 0, titleLineHeight)], Object.assign({}, depthProps, {
 	        color: '#ffffff',
+	        lineWidth: 1,
 	        transparent: true
-	      });
+	      }));
 	      line.renderOrder = renderOrders.line;
 	      group.add(line);
 	      group.add(this.titleLabel);

Різницю між файлами не показано, бо вона завелика
+ 1 - 1
public/lib/potree/potree.js.map


+ 10 - 3
src/sdk/cover/index.js

@@ -1291,11 +1291,13 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes }) => {
             let funs = getMeasureFunction(path, bus) 
 
 
-
+            let fadeFar = -1 
+            
             let functions = Object.assign(funs,{
                 bus,
                 changeCanEdit(state){
                     path.setEditEnable(state)
+                    functions.changeVisibilityRange(fadeFar)
                 }, 
                 visibility(v){ 
                     console.log('visibility', path.title, v)
@@ -1313,12 +1315,17 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes }) => {
                 changePathPoints(points){
                     console.log('changePathPoints??????????',points)
                 },
+                changeFontSize(fontsize){
+                    console.log('changeFontSize', path.title, fontsize)
+                    path.setFontSize(fontsize)
+                },
                 changeLine({width,color,altitudeAboveGround}){
                     path.setPathWidth(width)
                     path.setPathColor(color)
                 },
-                changeVisibilityRange(far){
-                    path.setFadeFar(far== -1 ? null : far)
+                changeVisibilityRange(far){//设置消失距离
+                    fadeFar = far 
+                    path.setFadeFar(( far== -1 || path.enableEdit) ? null : far) //注意:编辑时显示全部
                 }
                 
             })