xzw il y a 1 mois
Parent
commit
daef3fe5ff

+ 1 - 1
src/ExtendPointCloudOctree.js

@@ -779,7 +779,7 @@ export class ExtendPointCloudOctree extends PointCloudOctree{
         this.material.activeAttributeName = 
                 Potree.settings.showClass && attributes.classification ? 'classification' :  
                 Potree.settings.showHotTemp && attributes.temp ? 'temp' : 
-                Potree.settings.showHotIr && attributes.ir ? 'ir' : 
+                Potree.settings.showHotIr && !Potree.settings.isOfficial && attributes.ir ? 'ir' : 
                 Potree.settings.cloudAttributeName || 'rgba'
     }
     

+ 6 - 5
src/custom/materials/ModelTextureMaterial.js

@@ -559,9 +559,6 @@ export default class ModelTextureMaterial extends THREE.RawShaderMaterial {
      
 	setProjectedPanos(pano0, pano1, progressValue ){
         
- 		progressValue!=void 0 && (this.uniforms.progress.value = progressValue);
-		//pano0.ensureSkyboxReadyForRender();
-        
         
         if(pano0){
             this.uniforms.pano0Map.value = pano0.getSkyboxTexture();//pano0.texture
@@ -580,8 +577,12 @@ export default class ModelTextureMaterial extends THREE.RawShaderMaterial {
         this.pano0 = pano0
         this.pano1 = pano1
         
-        this.updateDepthTex(pano0)  
-        this.updateDepthTex(pano1)
+        //if (!('BasePanoMap' in this.defines)) {
+            progressValue!=void 0 && (this.uniforms.progress.value = progressValue); 
+            this.updateDepthTex(pano0)  
+            this.updateDepthTex(pano1)
+        //}
+        
         this.updateTempEnable()
         this.updateClassEnable()
         //console.log('setProjectedPanos', pano0&&pano0.id, pano1&&pano1.id)

+ 18 - 7
src/custom/modules/panos/Images360.js

@@ -590,6 +590,7 @@ export class Images360 extends THREE.EventDispatcher{
                     showHotTemp = show 
                     viewer.switchHotType()   
                     let pano = this.currentPano
+                    this.highMapCube && Potree.Utils.updateVisible(this.highMapCube, 'showHotTemp',  !show)
                     if(Potree.settings.displayMode == 'showPanos' && pano.has_temp){ 
                         
                         let change = ()=>{
@@ -624,7 +625,7 @@ export class Images360 extends THREE.EventDispatcher{
                     
                      
                     let pano = this.currentPano
-                    
+                    this.highMapCube && Potree.Utils.updateVisible(this.highMapCube, 'showHotIr',  !show) 
                     if(Potree.settings.displayMode == 'showPanos' && pano.has_ir){ 
                         
                         let change = ()=>{
@@ -658,7 +659,7 @@ export class Images360 extends THREE.EventDispatcher{
                     viewer.scene.pointclouds.forEach(e=>e.updateAttrAuto())
                     
                     
-                    
+                    this.highMapCube && Potree.Utils.updateVisible(this.highMapCube, 'showClass',  !show) 
                     if(Potree.settings.displayMode == 'showPanos' && pano.has_seg){
                       
                         let change = ()=>{
@@ -2395,6 +2396,16 @@ export class Images360 extends THREE.EventDispatcher{
                             opacity : 0.4,
                             depthTest:false,
                         }))
+                        
+                        /* var tile = new THREE.Mesh(geo, new ModelTextureMaterial({//之后有必要的话像4dkk一样换成ModelTextureMaterial,加深度图 
+                            //side:THREE.DoubleSide 
+                            transparent:true,
+                            opacity : 0.4,
+                            depthTest:false,
+                            defines: {
+                                BasePanoMap: '', //普通贴图当做全景图
+                            }, 
+                        })) */
                         tile.position.set(i-3.5, j-3.5, -4);
                          
                         
@@ -2468,8 +2479,8 @@ export class Images360 extends THREE.EventDispatcher{
                 cube.scale.set(s,s,s)
             }//注:由于原本的mesh上加了深度贴图,可能距离镜头比这里的近。凡是在cube以内的部分都会挡住cube导致模糊。但是应该不常见吧(另外到天空的边缘也是很近)。姑且depthTest=false
             
-            this.highMapCube.visible = false; 
-            Potree.Utils.setObjectLayers(this.highMapCube, 'sceneObjects'/* 'skybox' */) //它的深度是错误的,故不在skybox层渲染,影响edlRT, 而在renderOverlay时渲染覆盖。
+            this.hideHighMap()
+            Potree.Utils.setObjectLayers(this.highMapCube, 'sceneObjects'/* 'skybox' */) // 它的深度是错误的,故不在skybox层渲染,影响edlRT, 而在renderOverlay时渲染覆盖。
             //console.warn('addHighMapCube')
             
             
@@ -2674,13 +2685,13 @@ export class Images360 extends THREE.EventDispatcher{
     showHighMap(){  
         if(!this.highMapCube)   return 
         //console.warn('showHighMap')
-        this.highMapCube.visible = true; 
+        Potree.Utils.updateVisible(this.highMapCube, 'show',  true)
          
     } 
     hideHighMap(){ 
         if(!this.highMapCube)   return
-        //console.warn('hideHighMap')        
-        this.highMapCube.visible = false;
+        //console.warn('hideHighMap')    
+        Potree.Utils.updateVisible(this.highMapCube, 'show',  false) 
     }
     //缩小后继续显示cube呢还是不显示?  不显示的话,就要把cube上的复制到renderTarget上……会不会又崩溃,or没加载的显示???
     

+ 5 - 4
src/custom/modules/panos/TempImageSampler.js

@@ -76,9 +76,10 @@ class TempImageSampler extends THREE.EventDispatcher{
         if(!image)return console.error( 'no'+ type+'Tex', currentPano)
         let {value,x,y} = this.getValue(image, uv.x, uv.y, useNeighIfZero);
          
-        
-        celsius && (value = math.getCelsiusFromKelvin(value))
-        
+         
+         
+        //0的代表无数据,但如果真是这个度数(-273.1摄氏度)也没办法,应该不会吧
+         
         if (!value ){
             if(this.ignoreTopAndBtmHole){
                 return null 
@@ -104,7 +105,7 @@ class TempImageSampler extends THREE.EventDispatcher{
             //console.log('无穷远')
             return !1;  //应该是天空或模型外 , 因为很少有漫游点的地方还拍不到地板
         }   
-        
+        celsius && (value = math.getCelsiusFromKelvin(value))
         console.log('value',  value )  
         return {  value,  x,y, uv } 
     }