|
@@ -55875,8 +55875,7 @@
|
|
|
|
|
|
pointDensity:{
|
|
|
magnifier:{
|
|
|
- maxLevelPercent: 1,
|
|
|
- pointBudget : 8*1000*1000,
|
|
|
+ maxLevelPercent: 1
|
|
|
},
|
|
|
panorama:{//显示全景时的漫游。因为点只能显示1个像素的大小,所以必须很密集,但又要限制点的数量
|
|
|
maxLevelPercent: 0.6,
|
|
@@ -104161,6 +104160,7 @@ ENDSEC
|
|
|
let sizeType;
|
|
|
let colorType;
|
|
|
let opacityBefore = new Map();
|
|
|
+ let sizeBefore = new Map();
|
|
|
let visiMap = new Map();
|
|
|
this.viewport.beforeRender = ()=>{
|
|
|
|
|
@@ -104170,6 +104170,7 @@ ENDSEC
|
|
|
e.visible = Potree.Utils.getObjVisiByReason(e, 'datasetSelection'); //先将隐藏的点云显示
|
|
|
|
|
|
opacityBefore.set(e,e.temp.pointOpacity);
|
|
|
+ sizeBefore.set(e,e.temp.pointSize);
|
|
|
});
|
|
|
|
|
|
|
|
@@ -104185,7 +104186,7 @@ ENDSEC
|
|
|
colorType = e.material.activeAttributeName;
|
|
|
e.material.activeAttributeName = 'rgba';
|
|
|
e.changePointOpacity(1);
|
|
|
-
|
|
|
+ e.changePointSize(Potree.config.material.realPointSize, true);
|
|
|
});
|
|
|
};
|
|
|
|
|
@@ -104199,6 +104200,7 @@ ENDSEC
|
|
|
e.material.pointSizeType = sizeType;
|
|
|
e.material.activeAttributeName = colorType;
|
|
|
e.changePointOpacity(opacityBefore.get(e));
|
|
|
+ e.changePointSize(sizeBefore.get(e));
|
|
|
});
|
|
|
|
|
|
};
|
|
@@ -134998,15 +135000,8 @@ ENDSEC
|
|
|
set: (density)=>{
|
|
|
if(density && density != pointDensity){
|
|
|
let pointBudget;
|
|
|
- var config = Potree.config.pointDensity[density];
|
|
|
-
|
|
|
- if(this.magnifier.visible){//放大镜打开时不要切换pointBudget,否则点云会闪烁。这时使用最高密度。
|
|
|
- pointBudget = Potree.config.pointDensity['magnifier'].pointBudget;
|
|
|
- }else {
|
|
|
- pointBudget = config.pointBudget;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+ var config = Potree.config.pointDensity[density];
|
|
|
+ pointBudget = config.pointBudget;
|
|
|
viewer.setMinNodeSize(config.minNodeSize || Potree.config.minNodeSize);
|
|
|
viewer.setPointBudget(pointBudget );
|
|
|
//Potree.maxPointLevel = config.maxLevel
|
|
@@ -135809,12 +135804,12 @@ ENDSEC
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- setPointBudget (value) { //pointBudget: 每次刷新显示点数量的最大值。 缓存中的点数量也跟此有关,但大于这个数值。
|
|
|
- if (Potree.pointBudget !== value) {
|
|
|
- Potree.pointBudget = parseInt(value);
|
|
|
- this.dispatchEvent({'type': 'point_budget_changed', 'viewer': this});
|
|
|
- }
|
|
|
- };
|
|
|
+ setPointBudget (value) {
|
|
|
+ if (Potree.pointBudget !== value && value) {
|
|
|
+ Potree.pointBudget = parseInt(value);
|
|
|
+ this.dispatchEvent({'type': 'point_budget_changed', 'viewer': this});
|
|
|
+ }
|
|
|
+ };
|
|
|
|
|
|
getPointBudget () {
|
|
|
return Potree.pointBudget;
|