xzw před 2 měsíci
rodič
revize
84dd5b0a5c
2 změnil soubory, kde provedl 117 přidání a 11 odebrání
  1. 116 10
      public/lib/potree/potree.js
  2. 1 1
      public/lib/potree/potree.js.map

+ 116 - 10
public/lib/potree/potree.js

@@ -19704,8 +19704,7 @@
 	        if (i > 1) {
 	          // 和上一个加入点的vec之间的夹角如果过大就加入 
 	          if (pointIndexs.includes(i) || curVec.angleTo(lastVec) > minRad) {
-	            //最小角度
-	            console.log('push ', i, curVec.angleTo(lastVec));
+	            //最小角度 
 	            newPoints.push(point);
 	            UtoTMapArr && newUtoTMapArr.push(UtoTMapArr[i]);
 	            lastVec = curVec;
@@ -19766,7 +19765,7 @@
 	      if (!options.dontSmooth) {
 	        //平滑连续的曲线(但经常会有扭曲的问题,tension:0能缓解, 另外shape和path都最好在原点附近,也就是点需减去bound.min )
 	        options.extrudePath = new CatmullRomCurve3(options.extrudePath, options.closed, 'catmullrom' /* 'centripetal' */, options.tension); //tension:张力, 越大弯曲越大。 随着长度增长,该值需要减小,否则会扭曲
-	        if (options.lessPoints !== false) {
+	        if (options.lessPoints /*  !== false */) {
 	          //曲线但压缩直线部分点数量
 	          options.extrudePath.UtoTMapArr = []; //用于存储 getSpacedPoints得到的点对应points的百分比对应
 	          var count = Math.max(2, Math.round(length * 30 /* 400 */));
@@ -24307,7 +24306,115 @@
 	          color: '#48a',
 	          radius: 0.08,
 	          height: -0.5
-	        }],
+	        }
+
+	        /* {//cross n
+	            path:[{
+	                "x": 67.07955953921191,
+	                "y": 42.43221326163323,
+	                "z": 3
+	            },
+	            {
+	                "x": 61.893225891856005,
+	                "y": 51.21636591599333,
+	                "z": 3
+	            }],
+	            color:'#faa', radius:0.1, height:0
+	        }, 
+	        
+	         
+	        
+	        
+	        {//cross n
+	            path:[{
+	                "x": 61.125217071633024,
+	                "y": 45.61024394626761,
+	                "z": 3
+	            },
+	            {
+	                "x": 71.39519484782664,
+	                "y": 47.81818954083545,
+	                "z": 3
+	            }],
+	            color:'#faa', radius:0.1, height:0
+	        },
+	        
+	        {//cross n
+	            path:[{
+	                "x": 58.307941469658175,
+	                "y": 38.00791434589657,
+	                "z": 3
+	            },
+	            {
+	                "x": 70.97012488078363,
+	                "y": 54.49470440381565,
+	                "z": 3
+	            }],
+	            color:'#faa', radius:0.1, height:0
+	        },
+	        
+	        {//cross n
+	            path:[{
+	                "x": 59.40792027206088,
+	                "y": 49.62134527481198,
+	                "z": 3
+	            },
+	            {
+	                "x": 67.22182631922209,
+	                "y": 44.893214711761544,
+	                "z": 3
+	            }],
+	            color:'#faa', radius:0.1, height:0
+	        },
+	         
+	        
+	        {//cross
+	        path:[
+	            {
+	                "x": 22.264080508219305,
+	                "y": 12.15228853990859,
+	                "z": 1
+	            },
+	            {
+	                "x": 19.005656779941955,
+	                "y": 16.23551039605065,
+	                "z": 1
+	            },
+	            {
+	                "x": 20.979741345561404,
+	                "y": 17.51464704500214,
+	                "z": 1
+	            },
+	            {
+	                "x": 21.5934746129188,
+	                "y": 17.195035517333054,
+	                "z": 1
+	            },
+	            {
+	                "x": 22.63170813625128,
+	                "y": 15.760646363029101,
+	                "z": 1
+	            },
+	            {
+	                "x": 16.694896649835762,
+	                "y": 11.78057010590217,
+	                "z": 1
+	            },
+	            {
+	                "x": 21.936713867547073,
+	                "y": 10.835961521749118,
+	                "z": 1
+	            },
+	            {
+	                "x": 22.97841434844728,
+	                "y": 13.551361417531485,
+	                "z": 1
+	            }
+	        ],
+	            color:'#eee', radius:0.1, height:0
+	        },              
+	        
+	         */],
 	        'SS-t-HE28Q2wHFS': [
 	        //食堂 test
 	        {
@@ -24317,8 +24424,8 @@
 	            "y": 1.508718032877598,
 	            "z": 2.6578301191329956
 	          }, {
-	            "x": 1.3691028191759722,
-	            "y": 1.9808285943848674,
+	            "x": 1.7691028191759722,
+	            "y": 2.1808285943848674,
 	            "z": 2.642110586166382
 	          }, {
 	            "x": 2.164859460492007,
@@ -24329,8 +24436,7 @@
 	          radius: 0.05,
 	          height: 0.13,
 	          spaceDis: 0.02,
-	          tension: 0.5,
-	          minRad: 0.01
+	          tension: 0 /* , dontSmooth:true */ /* , minRad:0.01 */
 	        }]
 	        /* 'SG-t-h0I7LnfGFwj':[ //港华M层
 	            {
@@ -50551,7 +50657,7 @@
 	        points = newPoints 
 	        */
 
-	        var result = DrawUtil.lessCurvePoints(points, 0.05, curve.UtoTMapArr);
+	        var result = MeshDraw.lessCurvePoints(points, 0.05, curve.UtoTMapArr);
 	        this.UtoTMapArr = result.newUtoTMapArr;
 	        points = result.newPoints;
 	        count = points.length;
@@ -93084,7 +93190,7 @@
 	            //height:在path之上的高度,负数代表在path之下
 	            var name = 'tube_' + index;
 	            var options = arguments[0];
-	            var radialSegments = MathUtils.clamp(Math.round(radius * 800), 10, 40);
+	            var radialSegments = 5; //THREE.Math.clamp( Math.round(radius * 800), 10, 40)
 	            var radSegments = Math.PI * 2 / radialSegments;
 	            var circlePts = []; //横截面
 	            for (var i = 0; i < radialSegments; i++) {

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
public/lib/potree/potree.js.map