xzw 8 ماه پیش
والد
کامیت
099cd13616
3فایلهای تغییر یافته به همراه17 افزوده شده و 12 حذف شده
  1. 9 4
      public/lib/potree/potree.js
  2. 1 1
      public/lib/potree/potree.js.map
  3. 7 7
      src/sdk/cover/index.js

+ 9 - 4
public/lib/potree/potree.js

@@ -42274,6 +42274,7 @@
 	            this.updateDatasetBelong(index); //获取dataset_point
 	            viewer.measuringTool.history.afterChange(this);
 	            this.updateEdge();
+	            this.hideArrowUntilUpdate();
 	            this.dispatchEvent('changed');
 	          } else {
 	            //this.isNew || viewer.measuringTool.isAdding || viewer.focusOnObject(this, 'measure') //正在添加测量线时不要focus其他线(容易误触)
@@ -42368,7 +42369,9 @@
 	    }
 	  }
 	  setPathWidth(w) {
-	    this.halfPathWidth = w / 2;
+	    var v = w / 2;
+	    if (this.halfPathWidth == v) return;
+	    this.halfPathWidth = v;
 	    this.markers.forEach(e => setMarkerScale(e, this.halfPathWidth));
 	    this.updateEdge();
 	    viewer.dispatchEvent('content_changed');
@@ -42473,6 +42476,7 @@
 	        //viewer.measuringTool.history.beforeChange(this)
 	        var _index = this.markers.indexOf(marker);
 	        this.removeMarker(_index);
+	        this.hideArrowUntilUpdate();
 	        //viewer.measuringTool.history.afterChange(this)
 	        this.dispatchEvent('changed');
 	      } else {
@@ -42759,7 +42763,7 @@
 	    });
 	    var waitAdd = [];
 	    var minDisSq = Infinity;
-	    var quaBase = new Quaternion().setFromEuler(new Euler(-Math.PI / 2, 0, (this.reverse ? -1 : 1) * Math.PI / 2));
+	    var quaBase = new Quaternion().setFromEuler(new Euler(-Math.PI / 2, 0, Math.PI / 2));
 	    var startTime = performance.now();
 	    var lines = [];
 	    paths.forEach(path => {
@@ -42838,7 +42842,7 @@
 	        var scaleMatrix = scaleMap.get(e.lineInfo.path);
 	        if (!scaleMatrix) {
 	          var s = e.lineInfo.path.halfPathWidth * 1.6;
-	          scaleMatrix = new Matrix4().scale(new Vector3(s, s, s));
+	          scaleMatrix = new Matrix4().scale(new Vector3((e.lineInfo.path.reverse ? -1 : 1) * s, s, s));
 	          scaleMap.set(e.lineInfo.path, scaleMatrix);
 	        }
 	        var qua = math.getQuaFromPosAim(new Vector3(), e.lineInfo.dir).multiply(quaBase);
@@ -56450,7 +56454,7 @@
 	    var group = new Object3D();
 	    this.spot = new Mesh(planeGeo$3, new DepthBasicMaterial(Object.assign({}, depthMatProp, {
 	      transparent: true,
-	      map: texLoader$8.load(Potree.resourcePath + '/textures/spot_default.png')
+	      map: texLoader$8.load(o.spotUrl || Potree.resourcePath + '/textures/spot_default.png')
 	    })));
 	    this.spot.scale.set(defaultSpotScale, defaultSpotScale, defaultSpotScale);
 	    this.spot.renderOrder = renderOrders$1.spot;
@@ -80257,6 +80261,7 @@
 	window.addEventListener('blur',()=>{
 	    console.log('blur',window.winIndex)
 	}) */
+	Cache.enabled = true; //这样不会重复网络请求相同的图 
 
 	class Viewer$1 extends ViewerBase {
 	  constructor(domElement, mapArea_) {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
public/lib/potree/potree.js.map


+ 7 - 7
src/sdk/cover/index.js

@@ -1306,8 +1306,8 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
                 })
                 viewer.dispatchEvent({ type: 'cancel_insertions', dontRemove: true, measure:path }) //要等进入编辑才能继续编辑
             }else{
-                info.dataset_points = props.points.map(e=>e.modelId)
-                info.points_datasets = props.points.map(e=>e.position)
+                info.points_datasets = props.points.map(e=>e.modelId)
+                info.dataset_points = props.points.map(e=>e.position)
                 path = viewer.measuringTool.createMeasureFromData(info);
                 
                 if(props.line.position) {
@@ -1493,17 +1493,18 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
         createTagging(props){
             let bus = mitt()
             
-        
+            console.warn('createTagging', props)
             let root = viewer.scene.pointclouds.concat(viewer.objs.children).find(e=>e.dataset_id == props.modelId)
             if(!root){
                 return console.error('热点没有找到该modelId,模型是否已经删除?')
             }
             
-            let info = {  
+            let info = {
                 position: new THREE.Vector3().copy(props.position), //局部坐标
                 normal: new THREE.Vector3().copy(props.normal), 
                 root,   lineLength: props.altitudeAboveGround,
-                title: props.title,  fontsize: props.fontSize
+                title: props.title,  fontsize: props.fontSize,
+                spotUrl: props.image
             }    
             let tag = viewer.tagTool.createTagFromData(info)
             
@@ -1596,9 +1597,8 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
             
             /* 
             
-            tag.functions.changeType(props.type)
+            tag.functions.changeType(props.type) 
             tag.functions.changeImage(props.image)
-            
              */