Procházet zdrojové kódy

fix: https://192.168.0.25/code/index.html在线版更改一些显示bug

xzw před 1 rokem
rodič
revize
1ff56b8c7a

+ 19 - 14
public/lib/potree/potree.js

@@ -81699,7 +81699,7 @@ void main()
             uniform float modelAlpha;
             uniform float opacity;
             uniform float progress;
-            uniform int blackout;
+            uniform int tranType;
             uniform vec3 pano0Position;
             uniform vec3 pano1Position;
             uniform float maxDistance;
@@ -81787,16 +81787,18 @@ void main()
             {
                 vec3 vWorldPosition0N = normalize(vWorldPosition0);
                 vec3 vWorldPosition1N = normalize(vWorldPosition1);
-               
+                float progress_ = progress;
                 
                 vec4 colorFromPano0 = vec4(0.0,0.0,0.0,0.0);
                 #if defined(usePanoMap0)
                     //即progress < 1.0   通常是1
                     colorFromPano0=textureCube(pano0Map,vWorldPosition0N.xyz);
+                #else 
+                    progress_ = 1.0;
                 #endif
                 vec4 colorFromPano1=textureCube(pano1Map,vWorldPosition1N.xyz);
  
-                gl_FragColor = mix(colorFromPano0,colorFromPano1,progress);
+                gl_FragColor = mix(colorFromPano0,colorFromPano1,progress_);
               
               
                 
@@ -81819,7 +81821,7 @@ void main()
                     vec2 depth1 = getDepth(vWorldPosition1N, depthMap1, cameraHeight1, ceilHeight1, eyePos);
                     
                     
-                    gl_FragDepthEXT = mix(depth0.y,depth1.y,progress); 
+                    gl_FragDepthEXT = mix(depth0.y,depth1.y,progress_); 
                     gl_FragDepthEXT = clamp(gl_FragDepthEXT, 0.0, 1.0);    //防止部分手机出现黑块。ios 16  。 因为我给的超远值超出范围
                     
 
@@ -86550,7 +86552,7 @@ void main()
 	        this.node.name = 'ImagesNode';
 	         
 	        this.cubePanos = [];
-	        
+	        //this.fastTranMaskPass = new THREE.TransitionPass()
 	        
 	        {
 	            this.cube = new Mesh(new BoxBufferGeometry(1,1,1,1),new ModelTextureMaterial());
@@ -159500,10 +159502,12 @@ ENDSEC
 	                this.fxaaPass.renderToScreen = true;
 	                
 					this.composer.addPass( this.fxaaPass );  */
-	                //抗锯齿截图 效果时而好时而不好,文字比较模糊
+	                //抗锯齿截图 效果时而好时而不好,文字比较模糊 
+	                //这两个暂时不能一起用。目前刚好不需要一起用
 	                
 	                
-	                //这两个暂时不能一起用。目前刚好不需要一起用
+	                //this.composer.addPass(this.images360.fastTranMaskPass)//add
+	                
 	                
 	            }
 	            
@@ -162622,7 +162626,9 @@ ENDSEC
 	            viewports = viewports.filter(v=>v.active); 
 	            if(viewports.length > 0){   
 	                params.viewports = viewports;  
-	                if(this.outlinePass.selectedObjects.length && this.outlinePass.edgeStrength > 0 && !params.screenshot){  
+	                if(this.outlinePass.selectedObjects.length && this.outlinePass.edgeStrength > 0 && !params.screenshot 
+	                   // || this.images360.fastTranMaskPass.enabled
+	                ){  
 	                    let scenes = this.inputHandler.interactiveScenes.concat(this.scene.scene).concat(viewer.scene.scenePointCloud); 
 	                    this.composer.render(scenes, null, this.viewports, this.renderDefault.bind(this));  
 	                }else {  
@@ -164331,14 +164337,13 @@ ENDSEC
 	                    //console.log(child.name, 'roughness',child.material.roughness,'metalness',child.material.metalness)
 	                       
 
-	                     //暂时用这种材质:
-	                    if(fileInfo_.unlit && (!(child.material instanceof MeshBasicMaterial) || object.fileType == 'glb')){
+	                     
+	                    /* if(fileInfo_.unlit && (!(child.material instanceof BasicMaterial) || object.fileType == 'glb')){ //注释掉是因为已经写入到loader文件里了
 	                        //let material = new THREE.MeshBasicMaterial({map:child.material.map})
-	                        let material = new BasicMaterial({map : child.material.map});  //很奇怪glb的图会使原本的MeshBasicMaterial 会偏暗,所以自己重新写
-	                        
+	                        let material = new BasicMaterial({map : child.material.map, opacity:child.material.opacity})  //很奇怪glb的图会使原本的MeshBasicMaterial 会偏暗,所以自己重新写
 	                        //child.material.dispose()
-	                        child.material = material; 
-	                    } 
+	                        child.material = material 
+	                    } */ 
 	                    if(fileInfo_.useStandandMat && !(child.material instanceof MeshStandardMaterial)){
 	                        child.material = new MeshStandardMaterial();
 	                    } 

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
public/lib/potree/potree.js.map


+ 1 - 1
src/sdk/cover/index.js

@@ -576,7 +576,7 @@ export const enter = (dom, mapDom, isLocal, lonlat) => {
                 readyToAddModel = true 
                 
                 //0看看,1看见,2深时,3用户上传三维模型,4深时mesh,5深光点云,6深光mesh
-                if(props.fromType == 4 || props.fromType == 6 ){//来自4dkk的3dtiles初始需要转90度
+                if(props.fromType == 1 || props.fromType == 4 || props.fromType == 6 ){//来自4dkk的3dtiles初始需要转90度
                     props.rotation = new THREE.Euler(Math.PI/2, 0,0)
                 }
             }