|
@@ -63344,7 +63344,7 @@ void main() {
|
|
|
|
|
|
};
|
|
|
|
|
|
-
|
|
|
+
|
|
|
var panosLoadDone = function(){
|
|
|
|
|
|
viewer.images360.loadDone();
|
|
@@ -68251,7 +68251,7 @@ void main() {
|
|
|
this.nodeMaxLevel = level;
|
|
|
//viewer.dispatchEvent({type:'updateNodeMaxLevel', pointcloud: this, nodeMaxLevel:level})
|
|
|
|
|
|
- //console.log('updateNodeMaxLevel ' + this.dataset_id + " : "+ this.nodeMaxLevel)
|
|
|
+ console.log('updateNodeMaxLevel ' + this.dataset_id + " : "+ this.nodeMaxLevel);
|
|
|
|
|
|
this.setPointLevel();//重新计算
|
|
|
|
|
@@ -87206,7 +87206,7 @@ void main() {
|
|
|
void main()
|
|
|
{
|
|
|
vec3 vWorldPosition0N = normalize(vWorldPosition0);
|
|
|
- vec3 vWorldPosition1N = normalize(vWorldPosition0);
|
|
|
+ vec3 vWorldPosition1N = normalize(vWorldPosition1);
|
|
|
/* vec2 samplerCoord0 = getSamplerCoord(vWorldPosition0.xyz);
|
|
|
vec2 samplerCoord1 = getSamplerCoord(vWorldPosition1.xyz);
|
|
|
vec4 colorFromPano0=texture2D(pano0Map,samplerCoord0);
|
|
@@ -90340,15 +90340,16 @@ void main() {
|
|
|
|
|
|
}
|
|
|
|
|
|
- deactivateTiledPano(e) {
|
|
|
- var t = this.getActiveRenderTargetDescriptor(e.id);
|
|
|
+ deactivateTiledPano(pano) {
|
|
|
+ var t = this.getActiveRenderTargetDescriptor(pano.id);
|
|
|
if(this.isRenderTargetDescriptorValid(t)){
|
|
|
this.deactiveDescripor(t.renderTarget);
|
|
|
- this.setActiveRenderTargetDescriptor(e.id, null);
|
|
|
+ this.setActiveRenderTargetDescriptor(pano.id, null);
|
|
|
}
|
|
|
- var i = this.getUploadQueueForPano(e.id);
|
|
|
+ var i = this.getUploadQueueForPano(pano.id);
|
|
|
this.clearUploadQueue(i);
|
|
|
this.updateActivePanos();
|
|
|
+ viewer.cancelLoad(pano);//add
|
|
|
}
|
|
|
|
|
|
|
|
@@ -90476,12 +90477,12 @@ void main() {
|
|
|
|
|
|
queueTileUpload(e, t, i) {
|
|
|
var n = this.getActiveRenderTargetDescriptor(e.panoId);
|
|
|
-
|
|
|
+
|
|
|
if (this.isRenderTargetDescriptorValid(n) && e.downloaded && !this.isTileUploaded(e) && (!e.uploadQueued || i)
|
|
|
&& (!(e.panoSize > this.qualityManager.getMaxNavPanoSize())|| this.zoomingActive)) {
|
|
|
|
|
|
var r = this.getUploadQueueForPano(e.panoId);
|
|
|
-
|
|
|
+ //console.log(window.sceneName, 'queueTileUpload: ', e.panoId, e.tileIndex, i)
|
|
|
if(i){
|
|
|
this.uploadTile(e, !1);//提交
|
|
|
}else {
|
|
@@ -91053,6 +91054,8 @@ void main() {
|
|
|
renderTarget = this.zoomRenderTarget;
|
|
|
size = this.zoomRenderTarget.width; //this.qualityManager.getMaxZoomPanoSize(); //放大后可能2048或4096
|
|
|
}
|
|
|
+ //console.log(window.sceneName, 'uploadTile ', id, tileIndex)
|
|
|
+
|
|
|
|
|
|
let done = ()=>{
|
|
|
if(!LodDescripor.uploaded.includes(tileIndex)){//已经upload过(本来这时候直接返回,但发现缩放后这不会归零,导致清晰度不更新,所以还是redraw且emit吧)
|
|
@@ -91916,11 +91919,13 @@ void main() {
|
|
|
//要改成飞进最近的。。。
|
|
|
if(this.panos.length == 0)return
|
|
|
//this.modeChanging = true //主要是因为到全景图不会立刻成功
|
|
|
- let wait = ()=>{
|
|
|
- this.removeEventListener('flyToPanoDone',wait);
|
|
|
- if(latestRequestMode == mode ){
|
|
|
- Potree.settings.displayMode = mode;
|
|
|
- }
|
|
|
+ let wait = (e)=>{
|
|
|
+ this.removeEventListener('flyToPanoDone',wait);
|
|
|
+ setTimeout(()=>{
|
|
|
+ if(latestRequestMode == mode ){
|
|
|
+ Potree.settings.displayMode = mode;
|
|
|
+ }
|
|
|
+ },e.makeIt ? 1 : 50);
|
|
|
};
|
|
|
this.flyToPano({
|
|
|
pano: this.findNearestPano(),
|
|
@@ -92262,6 +92267,7 @@ void main() {
|
|
|
|
|
|
|
|
|
cancelFlyToPano(){//取消当前已有的飞行准备,前提是相机还未移动
|
|
|
+ Potree.Log('cancelFlyToPano');
|
|
|
if(viewer.mainViewport.view.isFlying())return
|
|
|
this.nextPano = null;
|
|
|
this.latestToPano = null;
|
|
@@ -92321,13 +92327,13 @@ void main() {
|
|
|
this.nextPano = pano;
|
|
|
this.latestToPano = toPano;
|
|
|
//this.flying = true //防止新的请求
|
|
|
-
|
|
|
+ Potree.Log('flyToPano:'+pano.id + ' , duration:'+toPano.duration);
|
|
|
|
|
|
|
|
|
{//不飞的话是否不要执行这段?
|
|
|
|
|
|
let wait = ()=> {
|
|
|
- if(this.latestToPano != toPano)return //如果取消了
|
|
|
+ if(this.latestToPano != toPano)return Potree.Log('已经取消')//如果取消了
|
|
|
setTimeout(()=>{
|
|
|
if(this.latestToPano != toPano)return
|
|
|
this.flyToPano(toPano);
|
|
@@ -130988,16 +130994,20 @@ ENDSEC
|
|
|
});
|
|
|
1 === this.waitQueue.length && this.dispatchEvent({type:"loading", show:true});
|
|
|
}
|
|
|
- ifAllLoaded(object){
|
|
|
+ ifAllLoaded(/* object */){
|
|
|
if(this.waitQueue.length>0){
|
|
|
this.waitQueue = this.waitQueue.filter(function(e) {
|
|
|
return !e.isLoadedCallback()
|
|
|
});
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
0 === this.waitQueue.length && this.dispatchEvent({type:"loading", show:false});
|
|
|
}
|
|
|
-
|
|
|
+ cancelLoad(object){//add 突然出现还没加载完就被deactivateTiledPano但还在loading的情况,所以加了这个
|
|
|
+ this.waitQueue = this.waitQueue.filter(function(e) {
|
|
|
+ return e.object != object
|
|
|
+ });
|
|
|
+ this.ifAllLoaded();
|
|
|
+ }
|
|
|
|
|
|
setView(o={}){
|
|
|
let callback = ()=>{
|