|
@@ -560,15 +560,8 @@ export class Viewer extends ViewerBase{
|
|
|
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
|
|
@@ -1371,12 +1364,12 @@ export class Viewer extends ViewerBase{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- 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;
|