|
@@ -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');
|
|
|
}
|
|
|
});
|