|
@@ -762,7 +762,15 @@ export class Viewer extends ViewerBase{
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ {
|
|
|
|
+ let setInteract = ()=>{
|
|
|
|
+ this.interacted = true //标记这一帧用户有操作屏幕
|
|
|
|
+ }
|
|
|
|
+ this.addEventListener('global_mousedown', setInteract)
|
|
|
|
+ this.addEventListener('global_touchmove', setInteract)
|
|
|
|
+ this.addEventListener('global_mousewheel', setInteract)
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4164,10 +4172,11 @@ export class Viewer extends ViewerBase{
|
|
|
|
|
|
performance.mark('loop-start') ;// 无论有没有reportTimings都要获取,因为getBestCound需要
|
|
performance.mark('loop-start') ;// 无论有没有reportTimings都要获取,因为getBestCound需要
|
|
|
|
|
|
|
|
+ this.interacted = false
|
|
let depthTiming = Potree.timeCollect.depthSampler.median
|
|
let depthTiming = Potree.timeCollect.depthSampler.median
|
|
this.shelterCount = {byTex:0, byCloud:0, maxByTex: THREE.Math.clamp(0.2/depthTiming, 1, 10), maxByCloud:0 } //清空 因ifPointBlockedByIntersect可能在任何时候触发,所以需要一开始就定义这个,且每次计算最大可计算次数太麻烦了就定义一个吧。
|
|
this.shelterCount = {byTex:0, byCloud:0, maxByTex: THREE.Math.clamp(0.2/depthTiming, 1, 10), maxByCloud:0 } //清空 因ifPointBlockedByIntersect可能在任何时候触发,所以需要一开始就定义这个,且每次计算最大可计算次数太麻烦了就定义一个吧。
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
let deltaTime = this.clock.getDelta()
|
|
let deltaTime = this.clock.getDelta()
|
|
this.update(deltaTime, timestamp);
|
|
this.update(deltaTime, timestamp);
|
|
@@ -4200,7 +4209,7 @@ export class Viewer extends ViewerBase{
|
|
//-------------
|
|
//-------------
|
|
this.images360.tileDownloader.update()
|
|
this.images360.tileDownloader.update()
|
|
this.images360.panoRenderer.update()
|
|
this.images360.panoRenderer.update()
|
|
- this.images360.getNeighbours()
|
|
|
|
|
|
+ this.images360.getNeighbours(this.interacted)
|
|
this.computeShelter()
|
|
this.computeShelter()
|
|
//-------------
|
|
//-------------
|
|
if(this.stats){
|
|
if(this.stats){
|
|
@@ -4213,7 +4222,9 @@ export class Viewer extends ViewerBase{
|
|
this.resolveTimings(timestamp, Potree.measureTimings);
|
|
this.resolveTimings(timestamp, Potree.measureTimings);
|
|
//Potree.measureTimings = 1
|
|
//Potree.measureTimings = 1
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
postError(content, params = {}){
|
|
postError(content, params = {}){
|
|
let message = this.postMessage(content, params);
|
|
let message = this.postMessage(content, params);
|
|
|
|
|