Explorar o código

fix: 限制path的getSpacedPoints个数

xzw hai 2 días
pai
achega
129ff41675
Modificáronse 2 ficheiros con 3 adicións e 2 borrados
  1. 2 1
      public/lib/potree/potree.js
  2. 1 1
      public/lib/potree/potree.js.map

+ 2 - 1
public/lib/potree/potree.js

@@ -45408,7 +45408,8 @@
 	        var curve = this.curve = new CatmullRomCurve3(points, false);
 	        curve.UtoTMapArr = []; //用于存储 getSpacedPoints得到的点对应points的百分比对应
 	        var oldCount = count;
-	        count = Math.max(2, Math.round(this.getTotalDistance() * 200)), points = curve.getSpacedPoints(count - 1); //拆分为更密集的点
+	        count = MathUtils.clamp(Math.round(this.getTotalDistance() * 200), 2, 100000), points = curve.getSpacedPoints(count - 1); //拆分为更密集的点
+	        //count太多很卡住
 
 	        /* //window.arcLengthDivisions  && (curve.arcLengthDivisions = arcLengthDivisions) //默认200,但改为1也没变化呀
 	        let oldCount = count 

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
public/lib/potree/potree.js.map