zjs_project 1 year ago
parent
commit
618c5da330

+ 1 - 5
src/components/newBottomCom/viewCareful/viewCareful.vue

@@ -119,11 +119,7 @@
 				let item = this.lastCareList[index];
 				console.log("滑块值:", value,item);
 				if(this.overChange){
-					uni.showToast({
-						title: '请慢一点!',
-						icon: 'none',
-						duration: 2000
-					})
+					this.$message.warning("请慢一点!");
 					return false;
 				}
 				this.selectIndex = index;

+ 33 - 17
src/mixins/loadModel.js

@@ -104,7 +104,7 @@ export default {
 				// })
 			}
 			// allowSpaceId = [388];//模型有警告,需要看下
-			console.log("重新加载布局", arrFrunList,this.spaceList,this.gltfLayouts);
+			console.warn("重新加载布局", arrFrunList,this.spaceList,this.gltfLayouts,allowSpaceId);
 			arrFrunList.forEach(signel => {
 				let spaceId = this.spaceList.find(it => it.layoutId == signel.id).spaceId;
 				if(allowSpaceId.includes(spaceId)){//只加载允许的空间的布局,其他不加载
@@ -316,19 +316,28 @@ export default {
 		},
 		// 切换家具的显示隐藏
 		changeLayoutModelState(isShow=false){
-			console.log("移动过程中显示隐藏空间家具", this.gltfLayouts,isShow, this.leftSpaces, this.rightSpaces);
+			if(isShow){
+				this.instancedFurList.forEach(it=>{
+					it.visible = isShow;
+				})
+				console.log("移动过程中显示隐藏空间家具", this.gltfLayouts,isShow)
+				return false;
+			}
+			
 			const changeSpaceList = this.leftSpaces.concat(this.rightSpaces); // 只改变空间尺寸变化的家具模型
+			console.log("移动过程中显示隐藏空间家具", this.gltfLayouts,isShow, this.leftSpaces, this.rightSpaces,changeSpaceList);
 			for (let index = 0; index < changeSpaceList.length; index++) {
-				const element = changeSpaceList[index];
-				const gltfLayoutModels = this.gltfLayouts.filter(item => {
+				let element = changeSpaceList[index];
+				let gltfLayoutModels = this.gltfLayouts.filter(item => {
 					return element.layoutId == item.userData.layoutId && element.spaceId == item.userData.spaceId;
 				})
 				
 				if (!gltfLayoutModels || gltfLayoutModels.length == 0) {
 					continue;
 				}
+				console.warn("***隐藏空间家具***",element,gltfLayoutModels)
 				for (let j = 0; j < gltfLayoutModels.length; j++) {
-					const cube = gltfLayoutModels[j];
+					let cube = gltfLayoutModels[j];
 					this.changeCubeState(cube, isShow);
 				}
 			}
@@ -340,13 +349,13 @@ export default {
 				cube.instancedMeshIndexList.forEach(item=>{
 					let index = item.instancedMeshIndex;
 					let instancedMesh = this.instancedFurList[index];//网格实例对象
-					let curMeshIndex = item.instancedAtIndex;//当前家具模型在网格实例对象里面的序号
-					let stratMatrix = new THREE.Matrix4();//定义一个四维矩阵
-					instancedMesh.getMatrixAt(curMeshIndex,stratMatrix);//获取当前几何体的四维矩阵到stratMatrix里面
+					// let curMeshIndex = item.instancedAtIndex;//当前家具模型在网格实例对象里面的序号
+					// let stratMatrix = new THREE.Matrix4();//定义一个四维矩阵
+					// instancedMesh.getMatrixAt(curMeshIndex,stratMatrix);//获取当前几何体的四维矩阵到stratMatrix里面
 					
-					instancedMesh.instanceMatrix.needsUpdate = true;//更新之前,必须开启开关
+					// instancedMesh.instanceMatrix.needsUpdate = true;//更新之前,必须开启开关
 					instancedMesh.visible = isShow;
-					instancedMesh.setMatrixAt(curMeshIndex,stratMatrix);//更新几何体的世界矩阵
+					// instancedMesh.setMatrixAt(curMeshIndex,stratMatrix);//更新几何体的世界矩阵
 				})
 			}
 		},
@@ -365,6 +374,7 @@ export default {
 			}
 			
 			console.log("准备删除模型", spaceObj, this.gltfLayouts, this.arrFrunList);
+			
 			const gltfLayoutModels = this.gltfLayouts.filter(item => {
 				return spaceObj.layoutId == item.userData.layoutId && spaceObj.spaceId == item.userData.spaceId;
 			})
@@ -372,6 +382,7 @@ export default {
 			if (!gltfLayoutModels || gltfLayoutModels.length == 0) {
 				return;
 			}
+			let deleList = []
 			for (let j = 0; j < gltfLayoutModels.length; j++) {
 				const cube = gltfLayoutModels[j];
 	
@@ -379,12 +390,13 @@ export default {
 					cube.instancedMeshIndexList.forEach(item=>{
 						let index = item.instancedMeshIndex;
 						let instancedMesh = this.instancedFurList[index];//网格实例对象
-	
-						this.scene.remove(instancedMesh);//添加到场景中
+						deleList.push(instancedMesh)
+						// this.scene.remove(instancedMesh);//添加到场景中
 					})
 				}
-				console.log("删除原有模型", spaceObj.layoutId, cube);
 			}
+			// this.gltfLayouts //删除对象的家具模型
+			this.scene.remove(...deleList);
 		},
 		// 计算家具的位置
 		calculateLayoutModelSize() {
@@ -976,10 +988,10 @@ export default {
 			let promise_list = [];
 		
 			for (let index = 0; index < changeSpaces.length; index++) {
-				const element = changeSpaces[index];
+				let element = changeSpaces[index];
 		
 		
-				const layoutObj = this.arrFrunList.find((item)=>{
+				let layoutObj = this.arrFrunList.find((item)=>{
 					return item.id == element.layoutId;
 				})
 				console.log("请求布局的对象", layoutObj, element);
@@ -995,7 +1007,7 @@ export default {
 			}
 			Promise.all(promise_list).then(()=>{
 				this.$nextTick(()=>{
-					console.log("新布局替换完成");
+					console.warn("新布局替换完成",this.changeLayouts);
 					this.furnHandle(this.changeLayouts);
 				})
 			})
@@ -1040,13 +1052,17 @@ export default {
 					}
 				}
 			}
+			if(layoutObj==null){
+				console.warn("没有合适的布局", layoutObj);
+				return resolve()
+			}
 			console.log("找出最合适的布局", layoutObj)
 			console.log("更新空间的布局ID=", layoutObj.id)
 		
 			// 合适的布局更现有布局相同
 			if(spaceObj.layoutId == layoutObj.id){
 				this.calculateLayoutModelSize() // 提前计算模型的位置
-				this.changeLayoutModelState(true); // 显示家具模型
+				// this.changeLayoutModelState(true); // 显示家具模型
 				return resolve()
 			}
 		

+ 32 - 36
src/mixins/wallMethod.js

@@ -577,45 +577,41 @@ export default {
 							const curWallType  = wallType.find(it=>it.type == modelItem1.wallType)
 							const wallTypeGroups = wallType.filter(it=>it.group == curWallType.group)
 							const wallWidth = spaceSize - 2 * minWallWidth;
-								if(wallWidth > curWallType.width){
-									newWallType = curWallType;
-								}
-								for (let index = 0; index < wallTypeGroups.length; index++) {
-									const element = wallTypeGroups[index];
-									if(!newWallType){
-										if(element.width <= wallWidth){
-											newWallType = element;
-										}
-									}else{
-										if(element.width <= wallWidth && newWallType.width <= element.width ){
-											newWallType = element;
-										}
+							if(wallWidth > curWallType.width){
+								newWallType = curWallType;
+							}
+							for (let index = 0; index < wallTypeGroups.length; index++) {
+								const element = wallTypeGroups[index];
+								if(!newWallType){
+									if(element.width <= wallWidth){
+										newWallType = element;
 									}
-									try{
-										console.log("寻找最大的窗户",index, wallWidth, newWallType.width,element.width)
-									}catch(e){
-										console.error("***rrrrr***",e,element,newWallType)
+								}else{
+									if(element.width <= wallWidth && newWallType.width <= element.width ){
+										newWallType = element;
 									}
 								}
-			
-								item.wallModelData[1].wallWidth = newWallType.width;
-								if(newWallType != curWallType){ // 新模型
-									console.log("添加新模型")
-									item.wallModelData[1].willCurWallType = newWallType.type;
-									item.wallModelData[1].lastWallType = curWallType.type;
-			
-									isCreateNewWall = true;
-								}else{ 
-									console.log("还原老模型")
-								}
-								
-								// 初始化模型的尺寸
-								const initWallModel = this.gltfWalls.find(it=>{
-									return it.spaceId == spaceObj.spaceId && it.wallDirection == wallDirection && it.wallModelData.wallType == 0 && it.wallModelData.isFixedWidth == 'true'
-								})
-								const item0Width = Math.min((spaceSize -  newWallType.width - minWallWidth), initWallModel.wallModelInitData.wallWidth);
-								item.wallModelData[0].wallWidth = item0Width
-								console.log("还原第一面墙的宽度", item0Width ,spaceSize, newWallType.width, minWallWidth);
+								console.log("寻找最大的窗户",index, wallWidth, newWallType, element.width)
+							}
+		
+							item.wallModelData[1].wallWidth = newWallType.width;
+							if(newWallType != curWallType){ // 新模型
+								console.log("添加新模型")
+								item.wallModelData[1].willCurWallType = newWallType.type;
+								item.wallModelData[1].lastWallType = curWallType.type;
+		
+								isCreateNewWall = true;
+							}else{ 
+								console.log("还原老模型")
+							}
+							
+							// 初始化模型的尺寸
+							const initWallModel = this.gltfWalls.find(it=>{
+								return it.spaceId == spaceObj.spaceId && it.wallDirection == wallDirection && it.wallModelData.wallType == 0 && it.wallModelData.isFixedWidth == 'true'
+							})
+							const item0Width = Math.min((spaceSize -  newWallType.width - minWallWidth), initWallModel.wallModelInitData.wallWidth);
+							item.wallModelData[0].wallWidth = item0Width
+							console.log("还原第一面墙的宽度", item0Width ,spaceSize, newWallType.width, minWallWidth);
 						}else{ // 缩小
 							// 初始化模型的尺寸
 							const initWallModel = this.gltfWalls.find(it=>{

+ 14 - 24
src/pages/webgl_rxdz/webgl_rxdz.vue

@@ -870,9 +870,11 @@
 				this.overChange = true;//变形开始 防止在形变结束前,再次形变
 				this.currentChangeSpaceId = data.spaceId
 				this.changCurSpaceArea(data);
+				let space = this.spaceList.find(it=>it.spaceId==this.currentChangeSpaceId);
+				this.moveMeshCenter(space);
 			},
 			
-			// 旧版本空间移动,
+			// 空间移动,
 			changCurSpaceArea(data){
 				console.log("当前户型的核心点", this.curHouseObj.houseCore, this.overChange);
 				const houseCore = this.curHouseObj.houseCore.split(',');
@@ -955,7 +957,6 @@
 					// 默认往南 往西移动
 					this.moveSpace(curSpace, 2, 3, isZoomIn, newArea, newWidth, newHeight, changeWidth, changeHeight)
 				}
-				
 				setTimeout(() => {
 					that.updataPageData();
 					that.overChange = false;
@@ -963,6 +964,7 @@
 					that.calculateLayoutModelSize(); //重新计算家具位置
 					that.updateWallModels(); // 替换墙体模型
 					that.changeLayoutModel(); // 改变空间模型
+					that.changeLayoutModelState(true); // 显示家具模型
 				}, 4200);
 			}, 
 			moveSpace(curSpace, directionIndex, directionIndex01, isZoomIn, newArea, newWidth, newHeight, changeWidth, changeHeight){
@@ -971,18 +973,11 @@
 				const wallLock =  this.currWallLock(directionIndex, curSpace); //南边
 				const wallLock01 =  this.currWallLock(directionIndex01, curSpace); //东边
 			
-			
-			
 				console.log("移动空间", wallLock, wallLock01)
 			
 				if(wallLock ==-1 && wallLock01 == -1){
-					return uni.showToast({
-						title: "空间尺寸已锁定",
-						icon: "none",
-						duration: 3000
-					});
+					return this.$message.warning("空间尺寸已锁定");
 				}
-			
 				let changeValue = changeHeight;
 				if(wallLock == -1){
 					
@@ -1018,7 +1013,7 @@
 						that.selectWall(directionIndex);
 						that.moveSpaceWall(that.curWallDirection, isZoomIn, changeValue);
 						// 自动补墙逻辑
-						that.autoCreateWall(directionIndex, curSpace)
+						that.autoCreateWall(directionIndex, curSpace);
 						return
 					}
 			
@@ -1074,8 +1069,8 @@
 			
 					if(changeHeight > 0){
 						that.selectWall(directionIndex);
-						// 隐藏变化空间的家具模型,空间动画结束后显示
-						that.changeLayoutModelState(); 
+						// // 隐藏变化空间的家具模型,空间动画结束后显示
+						// that.changeLayoutModelState(); 
 						that.moveSpaceWall(that.curWallDirection, isZoomIn, changeHeight);
 						// 自动补墙逻辑
 						that.autoCreateWall(directionIndex, curSpace)
@@ -1092,18 +1087,15 @@
 						setTimeout(() => {
 							// // 选中墙面
 							that.selectWall(directionIndex01);
-							// 隐藏变化空间的家具模型,空间动画结束后显示
-							that.changeLayoutModelState(); 
-							// // 移动墙面
+							// // 隐藏变化空间的家具模型,空间动画结束后显示
+							// that.changeLayoutModelState(); 
+							// 移动墙面
 							that.moveSpaceWall(that.curWallDirection, isZoomIn, changeWidth);
 							// 自动补墙逻辑
 							that.autoCreateWall(directionIndex01, curSpace)
 						}, timeout);
 					}
-					
-					
 				}
-			
 			},
 			currWallLock(direction, curSpace){
 			
@@ -1198,11 +1190,7 @@
 				}
 				console.log("空间排查", this.leftSpaces, this.rightSpaces, result, space)
 				if(!result){
-					uni.showToast({
-						title: `关联空间[${ space && space.spaceName || ''}]达到极限值`,
-						icon: "none",
-						duration: 3000
-					});
+					this.$message.warning(`关联空间[${ space && space.spaceName || ''}]达到极限值`);
 				}
 				return result
 			},
@@ -2013,6 +2001,8 @@
 				// if(!this.checkRightSpace(!moveOut, moveValue, isNS)){
 				// 	return
 				// }
+				// 隐藏变化空间的家具模型,空间动画结束后显示
+				this.changeLayoutModelState(); 
 				console.log("关联空间XXXXX", this.leftSpaces, this.rightSpaces)
 			    for (let index = 0; index < this.leftSpaces.length; index++) {
 			        const element = this.leftSpaces[index];

+ 83 - 112
src/pages/webgl_rxdz_roam/webgl_rxdz_roam.vue

@@ -226,17 +226,17 @@
 				controls.zoomToCursor = true;
 				// controls.update();
 				// 监听相机移动事件-限制只能在当前空间范围内移动
-				controls.addEventListener('change', () => {
-					// 检查相机位置是否超出边界框
-					if (boundary && !boundary.containsPoint(camera.position)) {
-						let clampedPosition = new THREE.Vector3( );
-						boundary.clampPoint(camera.position,clampedPosition);
-						if(clampedPosition){
-							camera.position.copy(clampedPosition);
-							// controls.target.copy(clampedPosition);
-						}
-					}
-				});
+				// controls.addEventListener('change', () => {
+				// 	// 检查相机位置是否超出边界框
+				// 	if (boundary && !boundary.containsPoint(camera.position)) {
+				// 		let clampedPosition = new THREE.Vector3( );
+				// 		boundary.clampPoint(camera.position,clampedPosition);
+				// 		if(clampedPosition){
+				// 			camera.position.copy(clampedPosition);
+				// 			// controls.target.copy(clampedPosition);
+				// 		}
+				// 	}
+				// });
 				// controls.target = new THREE.Vector3( );;
 				// camera.lookAt(that.controlStarPosition.x,that.controlStarPosition.y,that.controlStarPosition.z);
                 raycaster = new THREE.Raycaster();
@@ -326,6 +326,7 @@
 						let index = mesh.instanceId;//射线相交是的实例序号
 						let spaceId = that.gltfSpaces[index].spaceId;//获取选中实例的空间id
 						if(floor.name == "花园"){//花园
+							return false;
 							let selectMesh = that.gltfSpaces.find(it=>{return it.spaceType==14 && it.instancedMeshIndexList[0].instancedAtIndex==index})
 							spaceId = selectMesh.spaceId;
 						}else{//室内
@@ -336,52 +337,30 @@
 						// let spaceId = that.gltfSpaces[index].spaceId;//获取选中实例的空间id
 						console.warn("***checkIntersection-地板***",mesh,floor,index,spaceId,that.spaceId)
 						//当前拾取到的是本空间的底部-意味着用户点击了地板
-						if(floor && spaceId == that.spaceId){
+						// if(floor && spaceId == that.spaceId){
 							// console.warn("***checkIntersection-地板***",mesh,floor)
 							moveCarmer(mesh.point);
 							return false;
-						}
+						// }
 					}
 			    }
 			}
 			//显示当前选中的视角或者隐藏所有视角-因为截图时不能保留视角
 			function hideOrShowActor (type) {
 				console.warn("***hideOrShowActor***",type)
-				if(type=='hide'){
-					that.actors.forEach(it=>{
-						it.visible = false;//隐藏所有的视角的mesh模型
-					})
-				}else{
-					if(!that.currentActor){
-						uni.showToast({
-							icon: "none",
-							title: "没有视角!",
-						});
-						return false;
-					}
-					that.actors.forEach(it=>{
-						if(that.currentActor.userIndex==it.userIndex){
-							it.visible = false;//隐藏即将切换到的视角的mesh模型
-						}else{
-							it.visible = true;//显示其他视角的模型
-						}
-					})
+				if(!that.currentActor){
+					this.$message.warning("没有视角!");
+					return false;
 				}
 			}
 			//自动切换视角
 			function switchActor () {
 				if(!that.currentActor){
-					uni.showToast({
-						icon: "none",
-						title: "没有当前视角!",
-					});
+					this.$message.warning("没有当前视角!");
 					return false;
 				}
 				if(!that.actors || that.actors.length==0){
-					uni.showToast({
-						icon: "none",
-						title: "没有视角!",
-					});
+					this.$message.warning("没有视角!");
 					return false;
 				}
 				let index = that.currentActor.userIndex;//当前视角的序号
@@ -398,8 +377,8 @@
 				let _x =  point.x - camera.position.x;//x轴移动的距离
 				let _z =  point.z - camera.position.z;//z轴移动的距离
 				// console.warn("***moveCarmer***",_x,_z)
-				let cameraNewPosition = {x:camera.position.x + _x,y:1.0,z:camera.position.z + _z};
-				let targetNewPosition = {x:controls.target.x + _x,y:1.0,z:controls.target.z + _z};
+				let cameraNewPosition = {x:camera.position.x + _x,y:1.5,z:camera.position.z + _z};
+				let targetNewPosition = {x:controls.target.x + _x,y:1.5,z:controls.target.z + _z};
 				let oldUp = {x:0,y:1,z:0};	
 				let newUp = {x:0,y:1,z:0};
 				moveTip(cameraNewPosition)
@@ -449,13 +428,6 @@
 			//移动视角点位
 			function moveActor (obj) {
 				clearEvent();//注销事件监听
-				that.actors.forEach(it=>{
-					if(obj.userIndex==it.userIndex){
-						it.visible = false;//隐藏
-					}else{
-						it.visible = true;//显示其他
-					}
-				})
 				// console.warn("***moveActor***",obj)
 				that.currentActor = obj;//记录下当前的视角对象 mesh网格模型
 				let cameraNewPosition = obj.position;
@@ -484,67 +456,66 @@
 					defaulIndex = 0;
 				}
 				that.actors = [];
-				that.loader.load("https://dm.static.elab-plus.com/miniProgram/hs/gltf/sxtgltf.gltf",  ( gltf ) => {
-					spaceObj.actors.forEach((actor,index)=>{
-						let model = gltf.scene; // 获取模型
-						let cloneModel = model.clone(true);//赋值模型,准备复用
-						cloneModel.children.map((v,i)=>{
-							if(v.material){
-								v.material = model.children[i].material.clone()
+				spaceObj.actors.forEach((actor,index)=>{
+					// let model = gltf.scene; // 获取模型
+					// let cloneModel = model.clone(true);//赋值模型,准备复用
+					// cloneModel.children.map((v,i)=>{
+					// 	if(v.material){
+					// 		v.material = model.children[i].material.clone()
+					// 	}
+					// })
+					// let cube = cloneModel;
+					let cube = {};
+					cube.name = "actor";
+					cube.userType = "mesh";
+					//新的摄像机的位置-新的摄像机角度是倾斜角度,所以z值需要计算,高度设置为模型高度的2倍
+					let _actorLoaction = actor.actorLocation.split(',');//x y z
+					let _actorTransform = actor.actorTransform.split(',');//旋转角度,取第三个值
+					let _hd = THREE.MathUtils.degToRad(parseInt(_actorTransform[2]));//将度转化为弧度。
+					let _hdY = THREE.MathUtils.degToRad(parseInt(_actorTransform[1]));//Y轴方向上将度转化为弧度。
+					if(parseInt(_actorLoaction[1])==0){//X轴
+						_actorLoaction[1] = spaceObj.centerX;
+					}
+					if(parseInt(_actorLoaction[0])==0){//Y轴
+						_actorLoaction[0] = spaceObj.centerY;
+					}
+					let X_C = _actorLoaction[0] - spaceObj.centerY;//X轴偏移量
+					let Y_C = _actorLoaction[1] - spaceObj.centerX;//Y轴偏移量
+					let px = spaceObj.centerX + X_C;
+					let py = spaceObj.centerY + Y_C;
+					let position = {
+						x:(parseInt(px))/100,
+						y:1.5, 
+						z:-(parseInt(py))/100,//模型Y轴坐标系正负值跟webglZ轴是相反的
+					}
+					//新的观察点的位置-取模型的中心点坐标,加上高度,由于模型都是贴地的,所以高度设置为1.5
+					let targetNewPosition = {
+						x:position.x + Math.sin(_hd),
+						y:1.5 + Math.tan(_hdY),
+						z:(position.z - Math.cos(_hd)),
+					}
+					cube.position = position;
+					// cube.scale.set(2, 2, 2);
+					cube.userIndex = index;
+					cube.actorEum = index;
+					cube.targetNewPosition = targetNewPosition;
+					// cube.visible = false;
+					console.warn("*actors*",cube)
+					that.actors.push(cube);//添加视角
+					if(index == defaulIndex){//隐藏当前视角
+						// cube.visible = false;
+						that.currentActor = cube;//记录下当前的视角对象 mesh网格模型
+						let param = {
+							type: 'CLK', //埋点类型
+							clkId: 'clk_2cmina_23080411', //点击ID
+							clkName: 'visualangle_clk', //点击前往的页面名称
+							clkParams: {
+								locusName: "预制视角",
+								type:that.actors[index].actorEum
 							}
-						})
-						let cube = cloneModel;
-						cube.name = "actor";
-						cube.userType = "mesh";
-						//新的摄像机的位置-新的摄像机角度是倾斜角度,所以z值需要计算,高度设置为模型高度的2倍
-						let _actorLoaction = actor.actorLocation.split(',');//x y z
-						let _actorTransform = actor.actorTransform.split(',');//旋转角度,取第三个值
-						let _hd = THREE.MathUtils.degToRad(parseInt(_actorTransform[2]));//将度转化为弧度。
-						let _hdY = THREE.MathUtils.degToRad(parseInt(_actorTransform[1]));//Y轴方向上将度转化为弧度。
-						if(parseInt(_actorLoaction[1])==0){//X轴
-							_actorLoaction[1] = spaceObj.centerX;
-						}
-						if(parseInt(_actorLoaction[0])==0){//Y轴
-							_actorLoaction[0] = spaceObj.centerY;
-						}
-						let X_C = _actorLoaction[0] - spaceObj.centerY;//X轴偏移量
-						let Y_C = _actorLoaction[1] - spaceObj.centerX;//Y轴偏移量
-						let px = spaceObj.centerX + X_C;
-						let py = spaceObj.centerY + Y_C;
-						let position = {
-							x:(parseInt(px))/100,
-							y:1.0, 
-							z:-(parseInt(py))/100,//模型Y轴坐标系正负值跟webglZ轴是相反的
-						}
-						//新的观察点的位置-取模型的中心点坐标,加上高度,由于模型都是贴地的,所以高度设置为1.0
-						let targetNewPosition = {
-							x:position.x + Math.sin(_hd),
-							y:1.0 + Math.tan(_hdY),
-							z:(position.z - Math.cos(_hd)),
-						}
-						cube.position.set(position.x,position.y,position.z)
-						cube.scale.set(2, 2, 2);
-						cube.userIndex = index;
-						cube.actorEum = index;
-						cube.targetNewPosition = targetNewPosition;
-						console.warn("*actors*",cube)
-						scene.add(cube);
-						that.actors.push(cube);//添加视角
-						if(index == defaulIndex){//隐藏当前视角
-							cube.visible = false;
-							that.currentActor = cube;//记录下当前的视角对象 mesh网格模型
-							let param = {
-								type: 'CLK', //埋点类型
-								clkId: 'clk_2cmina_23080411', //点击ID
-								clkName: 'visualangle_clk', //点击前往的页面名称
-								clkParams: {
-									locusName: "预制视角",
-									type:that.actors[index].actorEum
-								}
-							};
-							util.trackRequest(param);
-						}
-					})
+						};
+						util.trackRequest(param);
+					}
 				})
 			}
 			//计算当前选中空间的平视时的观察点和摄像机的放置点位
@@ -579,7 +550,7 @@
 				//新的摄像机的位置-新的摄像机角度是倾斜角度,所以z值需要计算,高度设置为模型高度的2倍
 				let cameraNewPosition = {
 					x:(parseInt(px))/100,
-					y:1.0, 
+					y:1.5, 
 					z:-(parseInt(py))/100,//模型Y轴坐标系正负值跟webglZ轴是相反的
 				}
 				if(cameraNewPosition){
@@ -599,10 +570,10 @@
 						console.warn("**roamPositionHandle-观察点不在空间范围-强制修正观察点位置****",JSON.stringify(cameraNewPosition))
 					}
 				}
-				//新的观察点的位置-取模型的中心点坐标,加上高度,由于模型都是贴地的,所以高度设置为1.0
+				//新的观察点的位置-取模型的中心点坐标,加上高度,由于模型都是贴地的,所以高度设置为1.5
 				let targetNewPosition = {
 					x:cameraNewPosition.x + Math.sin(_hd),
-					y:1.0 + Math.tan(_hdY),
+					y:1.5 + Math.tan(_hdY),
 					z:(cameraNewPosition.z - Math.cos(_hd)),
 				}
 				return {cameraNewPosition,targetNewPosition}