Sfoglia il codice sorgente

fix: 点云 最低限制 提高。增加内存

xzw 2 giorni fa
parent
commit
8afd1e44d6

+ 3 - 3
public/lib/potree/potree.js

@@ -73881,7 +73881,7 @@
 	      tiles3DMaxMemory: Potree.settings.tiles3DMaxMemory,
 	      maxLRUPoints: Potree.settings.maxLRUPoints
 	    };
-	    var maxMemory = 1500; //1500 //M 整体占用内存限制 (不考虑峰值,要等静止后退下来的值)      //什么都不加载可能就占了300M
+	    var maxMemory = Potree.settings.maxMemory || 2000; //1500 //M 整体占用内存限制 (不考虑峰值,要等静止后退下来的值)      //什么都不加载可能就占了300M
 	    var eachObjPosWeight = 100 / 1000 / 1000; //M  每个顶点pos是3*4个字节?法线3*4和uv2*4 + faceIndex比较难说  
 	    var eachCloudPointWeight = 70 / 1000 / 1000; //M 每个点 pos + 颜色 + 法线 大概 根据测试算出来也是这个值   0.00007
 	    //const eachVisiCPointWeight = eachCloudPointWeight * 5    // 或 maxMemory / (6*1000*1000) 大概值接近 (再除以一个数是因为显示的要比内存中的耗更多资源
@@ -73962,10 +73962,10 @@
 	            resolved = true;
 	          }
 	        } else {
-	          Potree.pointBudget = MathUtils.clamp(Potree.numVisiblePoints, Potree.config.pointDensity.low.pointBudget / 10, Potree.pointBudget * 0.8); //先往降到可见数量方向降 (当画面中可见点确实很少时允许降低到low之下)
+	          Potree.pointBudget = MathUtils.clamp(Potree.numVisiblePoints, Potree.config.pointDensity.low.pointBudget / 2, Potree.pointBudget * 0.9); //先往降到可见数量方向降 (当画面中可见点确实很少时允许降低到low之下)
 
 	          Potree.settings.maxLRUPoints = Math.min(Potree.lru.numPoints, Potree.settings.maxLRUPoints); //先降到已使用的数量
-	          Potree.settings.maxLRUPoints *= 0.8;
+	          Potree.settings.maxLRUPoints *= 0.9;
 	          resolved = true;
 	        }
 	      }

File diff suppressed because it is too large
+ 1 - 1
public/lib/potree/potree.js.map


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

@@ -230,7 +230,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
     //Potree.fileServer = axios 
     Potree.settings.libsUrl = './lib/'
     let loadStartTime = Date.now()
-    Potree.settings.maxMemory = 2000 //!!!!因为模型很多所以多加了500
+    Potree.settings.maxMemory = 2500 //!!!!因为模型很多所以多加了500
     //正式环境(本地调试会打不开)
     if (location.host === 'mix3d.4dkankan.com') {
         Potree.settings.urls.prefix = Potree.settings.urls.prefix6