|
@@ -97,9 +97,7 @@ export class Images360 extends THREE.EventDispatcher{
|
|
|
|
|
|
|
|
|
|
this.depthSampler = new DepthImageSampler();
|
|
this.depthSampler = new DepthImageSampler();
|
|
- this.addEventListener('loadedDepthImg',(e)=>{
|
|
|
|
- e.loaded && this.updateDepthTex(e.pano)
|
|
|
|
- })
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -307,20 +305,16 @@ export class Images360 extends THREE.EventDispatcher{
|
|
if(config2.showSkybox || config2.pointUsePanoTex){
|
|
if(config2.showSkybox || config2.pointUsePanoTex){
|
|
let wait = (e)=> {
|
|
let wait = (e)=> {
|
|
viewer.ifAllLoaded()
|
|
viewer.ifAllLoaded()
|
|
- if(e.pano && e.pano != this.currentPano)return//loadedDepthImg
|
|
|
|
|
|
+ //if(e.pano && e.pano != this.currentPano)return//loadedDepthImg
|
|
setTimeout( ()=>{
|
|
setTimeout( ()=>{
|
|
if(this.latestRequestMode == mode ){
|
|
if(this.latestRequestMode == mode ){
|
|
Potree.settings.displayMode = mode
|
|
Potree.settings.displayMode = mode
|
|
}
|
|
}
|
|
},1)
|
|
},1)
|
|
}
|
|
}
|
|
- if(!this.currentPano.depthTex && this.currentPano.pointcloud.hasDepthTex){
|
|
|
|
- this.addEventListener('loadedDepthImg', wait, {once:true})
|
|
|
|
- pano.waitForLoad()
|
|
|
|
- return this.currentPano.loadDepthImg()
|
|
|
|
- }
|
|
|
|
|
|
+ /*
|
|
//this.updateDepthTex()
|
|
//this.updateDepthTex()
|
|
- /* if(this.checkAndWaitForPanoLoad(this.currentPano, this.basePanoSize, wait)){
|
|
|
|
|
|
+ if(this.checkAndWaitForPanoLoad(this.currentPano, this.basePanoSize, wait)){
|
|
return
|
|
return
|
|
} */
|
|
} */
|
|
if(!this.currentPano.skyboxTex){
|
|
if(!this.currentPano.skyboxTex){
|
|
@@ -673,9 +667,9 @@ export class Images360 extends THREE.EventDispatcher{
|
|
|
|
|
|
{//不飞的话是否不要执行这段?
|
|
{//不飞的话是否不要执行这段?
|
|
|
|
|
|
- let wait = (e)=> {
|
|
|
|
|
|
+ let wait = ( )=> {
|
|
viewer.ifAllLoaded()
|
|
viewer.ifAllLoaded()
|
|
- if(e.pano && this.latestToPano && e.pano != this.latestToPano.pano)return//loadedDepthImg
|
|
|
|
|
|
+ if( this.latestToPano && pano != this.latestToPano.pano)return//loadedDepthImg
|
|
if(this.latestToPano != toPano)return /* Potree.Log('已经取消') *///如果取消了
|
|
if(this.latestToPano != toPano)return /* Potree.Log('已经取消') *///如果取消了
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
if(this.latestToPano != toPano)return
|
|
if(this.latestToPano != toPano)return
|
|
@@ -684,7 +678,7 @@ export class Images360 extends THREE.EventDispatcher{
|
|
}
|
|
}
|
|
if(!pano.depthTex && pano.pointcloud.hasDepthTex){ //点云模式也要加载depthTex,因获取neighbour需要用到
|
|
if(!pano.depthTex && pano.pointcloud.hasDepthTex){ //点云模式也要加载depthTex,因获取neighbour需要用到
|
|
//console.log('等待加载depthtex')
|
|
//console.log('等待加载depthtex')
|
|
- this.addEventListener('loadedDepthImg', wait, {once:true})
|
|
|
|
|
|
+ pano.addEventListener('loadedDepthImg', wait, {once:true})
|
|
pano.waitForLoad()
|
|
pano.waitForLoad()
|
|
return pano.loadDepthImg()
|
|
return pano.loadDepthImg()
|
|
}
|
|
}
|
|
@@ -697,7 +691,7 @@ export class Images360 extends THREE.EventDispatcher{
|
|
|
|
|
|
if(!pano.skyboxTex){
|
|
if(!pano.skyboxTex){
|
|
pano.waitForLoad()
|
|
pano.waitForLoad()
|
|
- this.addEventListener('loadedTex', wait, {once:true})
|
|
|
|
|
|
+ pano.addEventListener('loadedTex', wait, {once:true})
|
|
pano.loadTex()
|
|
pano.loadTex()
|
|
}
|
|
}
|
|
/* if(this.checkAndWaitForPanoLoad(pano, toPano.basePanoSize || this.basePanoSize, wait )){
|
|
/* if(this.checkAndWaitForPanoLoad(pano, toPano.basePanoSize || this.basePanoSize, wait )){
|