|
@@ -83,8 +83,8 @@
|
|
|
actors:[],
|
|
|
showDownView:true,//默认显示下载按钮
|
|
|
currentActor:null,
|
|
|
- isIos:false, //是否ios手机。默认不是
|
|
|
circleGroup:null,
|
|
|
+ isIOS:false,
|
|
|
// aiImagesList:[
|
|
|
// // "https://dm.static.elab-plus.com/miniProgram/plus_IM01.png",
|
|
|
// // "https://dm.static.elab-plus.com/miniProgram/plus_IM02.png",
|
|
@@ -110,6 +110,7 @@
|
|
|
mounted(options) {
|
|
|
var that = this;
|
|
|
console.warn("***webgl_rxdz_roam-options***",this.$route.query)
|
|
|
+ this.isIOS = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
|
|
// alert("***mounted-webgl_rxdz_roam***"+this.curHouseObj)
|
|
|
let unit = window.screen.width / 750;//单位rpm 对应 px 的值
|
|
|
this.canvasHeight = window.screen.height - (600 * unit) + (40 * unit);
|
|
@@ -184,8 +185,8 @@
|
|
|
light.shadow.camera.top = 100; // 这个区域内产生阴影
|
|
|
light.shadow.camera.bottom = -100; // 这个区域内产生阴影
|
|
|
|
|
|
- light.shadow.mapSize.width = 8192; // 影响阴影的清晰度
|
|
|
- light.shadow.mapSize.height = 8192; // 影响阴影的清晰度
|
|
|
+ light.shadow.mapSize.width = 1024; // 影响阴影的清晰度
|
|
|
+ light.shadow.mapSize.height = 1024; // 影响阴影的清晰度
|
|
|
|
|
|
scene.add(light);
|
|
|
|
|
@@ -196,8 +197,10 @@
|
|
|
antialias:true,
|
|
|
preserveDrawingBuffer: true,
|
|
|
});
|
|
|
- // renderer.shadowMap.enabled = true;//产生阴影 IOS 下有阴影会导致渲染下重新执行挂载方法-页面会二次载入,不知原因
|
|
|
- // renderer.shadowMap.type = THREE.PCFSoftShadowMap; // 阴影属性
|
|
|
+ // if(!that.isIOS){
|
|
|
+ renderer.shadowMap.enabled = true;//产生阴影
|
|
|
+ renderer.shadowMap.type = THREE.PCFSoftShadowMap; // 阴影属性
|
|
|
+ // }
|
|
|
renderer.outputEncoding = THREE.sRGBEncoding;
|
|
|
renderer.outputColorSpace = THREE.SRGBColorSpace;
|
|
|
// renderer.toneMappingExposure = 0.1;//色调映射的曝光级别。默认是1
|
|
@@ -823,6 +826,13 @@
|
|
|
for (let index = 0; index < spaceList.length; index++) {
|
|
|
var element = spaceList[index];
|
|
|
// const centerX = JSON.parse(JSON.stringify(element.centerX))
|
|
|
+ if(!element.actors || element.actors.length==0){
|
|
|
+ element.actors = [{
|
|
|
+ actorLocation:element.actorLocation,
|
|
|
+ actorTransform:element.actorTransform,
|
|
|
+ isSelected:true,
|
|
|
+ }]
|
|
|
+ }
|
|
|
element.actors.forEach(actor=>{
|
|
|
let _actorLoaction = actor.actorLocation.split(',');//x y z
|
|
|
let X_C = (parseInt(_actorLoaction[0]) || element.centerY) - element.centerY;//X轴偏移量-UE原因
|
|
@@ -838,7 +848,6 @@
|
|
|
actor.presentX = Math.abs(_presentX)>1 ? (_presentX>1?1:-1) : _presentX;//观察点跟空间中心原点的距离比例
|
|
|
actor.presentY = Math.abs(_presentY)>1 ? (_presentY>1?1:-1) : _presentY;
|
|
|
})
|
|
|
-
|
|
|
element.wallMoveValue = "[0,0,0,0]"
|
|
|
this.spaceList.push(element);
|
|
|
this.wallIds.push(element.wallId);
|