Przeglądaj źródła

fix: groundImg rotate

xzw 1 rok temu
rodzic
commit
b92508904a

+ 5 - 4
public/lib/potree/potree.js

@@ -120967,9 +120967,9 @@ ENDSEC
 	    },
 	    
 	    
-	    setGroundPlaneImg(src,scale){//设置地面图
+	    setGroundPlaneImg(src,scale,angle){//设置地面图
 	        
-	        this.goundScale = scale;
+	        this.goundScale = scale || 1, this.goundAngle = angle || 0;
 	        let oldSrc = this.curGroundImgSrc;
 	        this.curGroundImgSrc = src;
 	        const ratio = 0.04;
@@ -120981,14 +120981,15 @@ ENDSEC
 	                let {width, height} = this.groundPlane.material.map.image;
 	                this.groundPlane.scale.set(width*s, height*s);  
 	                viewer.dispatchEvent('content_changed');
-	                
+	                this.groundPlane.rotation.z = MathUtils.degToRad(this.goundAngle);
 	                return
 	            }
 	            
 	            let map = texLoader$a.load(src,(tex)=>{
 	                if(this.curGroundImgSrc == src){
 	                    const s = ratio * this.goundScale;
-	                    this.groundPlane.scale.set(tex.image.width*s, tex.image.height*s);  
+	                    this.groundPlane.scale.set(tex.image.width*s, tex.image.height*s); 
+	                    this.groundPlane.rotation.z = MathUtils.degToRad(this.goundAngle);
 	                    viewer.dispatchEvent('content_changed');
 	                } 
 	            });

Plik diff jest za duży
+ 1 - 1
public/lib/potree/potree.js.map


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

@@ -375,7 +375,7 @@ export const enter = (dom, mapDom, isLocal, lonlat) => {
         },
          
  
-        setBackdrop(sky, type, scale ){//天空盒背景
+        setBackdrop(sky, type, {scale,rotate}){//天空盒背景
             //console.log('天空盒背景',  sky,type)
             
             let setGroundAndText = (color)=>{
@@ -387,7 +387,7 @@ export const enter = (dom, mapDom, isLocal, lonlat) => {
             
             
             if(type == 'bimg' ){//地面图 
-                MergeEditor.setGroundPlaneImg(sky, scale) 
+                MergeEditor.setGroundPlaneImg(sky, scale, rotate) 
                 setGroundAndText('#e0e0e0')
                 viewer.setBackground(mainBackground) 
             }else{