zjs_project 1 рік тому
батько
коміт
5efeb21a6f

+ 1 - 0
src/assets/common.scss

@@ -30,6 +30,7 @@
         color: rgba(255, 255, 255, 0.83);
         margin: 10px;
 		margin-top: 0px;
+		font-size: 18rem;
     }
 }
 .account-view{

+ 7 - 5
src/components/newBottomCom/viewMask/viewMask.vue

@@ -596,8 +596,9 @@
 				let that = this;
 				if (res.success && res.single) {
 					if(typeof(res.single)=="object"){
+					// if(true){
 						let cot = res.single.queueCount || 1;
-						this.showToast("正有"+cot+"人排队,预计等待"+cot*25+"秒");
+						this.showToast("正有"+cot+"人排队,预计等待"+cot*25+"秒",10000);
 						this.aiImage = "";
 						this.aiFlag = false;
 						this.clearInterval();
@@ -678,7 +679,8 @@
 							this.clearInterval();
 							if(this.aiImagesList.length>1){
 								setTimeout(()=>{
-									this.$refs.carousel.next();
+									// this.$refs.carousel.next();
+									this.$refs.carousel.setActiveItem(this.aiImagesList.length-1);//切换到最后一张
 								}, 1000);
 							}
 						} else {
@@ -701,19 +703,19 @@
 						}
 					} else {
 						let cot = res.single.queueCount || 1;
-						this.showToast("正有"+cot+"人排队,预计等待"+cot*25+"秒");
+						this.showToast("正有"+cot+"人排队,预计等待"+cot*25+"秒",10000);
 						this.aiImage = "";
 						this.aiFlag = false;
 						this.clearInterval();
 					}
 				}
 			},
-			showToast(title){
+			showToast(title,time=3000){
 				this.$store.state.loading = true;
 				this.$store.state.loadingMsg = title || "";
 				setTimeout(()=>{
 					this.$store.state.loading = false;
-				}, 3000);
+				}, time);
 			}
 		}
 	}

+ 3 - 3
src/mixins/loadModel.js

@@ -1009,9 +1009,9 @@ export default {
 				let pointLight = new THREE.PointLight(0xffd7b3, 1, 5, 1);
 				pointLight.position.set(cube.position.x, 1.5, cube.position.z); //default; light shining from top
 				this.scene.add(pointLight);
-				let sphereSize = 0.1;
-				let pointLightHelper = new THREE.PointLightHelper( pointLight, sphereSize );
-				this.scene.add( pointLightHelper);
+				// let sphereSize = 0.1;
+				// let pointLightHelper = new THREE.PointLightHelper( pointLight, sphereSize );
+				// this.scene.add( pointLightHelper);
 				
 				// pointLight.castShadow = true; // default false
 				// // 默认情况下光投影相机区域是一个长宽高为10x10x500的长方体区域,光源投射方向为通过坐标原点

+ 3 - 3
src/pages/webgl_rxdz/webgl_rxdz.vue

@@ -1606,8 +1606,7 @@
 					).toFixed(2));
 					sumArea +=curSpaceArea;
 				})
-				//fixedArea
-				this.changeArea = parseFloat((sumArea - this.sumArea).toFixed(2));
+				this.changeArea = parseFloat((sumArea - this.fixedArea).toFixed(2));
 				this.sumArea = parseFloat(sumArea.toFixed(2));
 				let str = JSON.stringify(this.spaceList)
 				//更新当前空间对象
@@ -1662,7 +1661,8 @@
 					that.loadSpace();
 				}, 100);
 				console.warn("***curHouseObj***",this.curHouseObj,this.aiData)
-				this.navbar.title = this.curHouseObj.name + "  " + this.curHouseObj.houseArea + "㎡";
+				// this.navbar.title = this.curHouseObj.name + "  " + this.curHouseObj.houseArea + "㎡";
+				this.navbar.title = "空间定制";
 				this.sumArea = this.curHouseObj.houseArea;
 				this.fixedArea = this.curHouseObj.houseArea;
 			},

+ 20 - 14
src/pages/webgl_rxdz_roam/webgl_rxdz_roam.vue

@@ -235,17 +235,17 @@
 				// controls.target.copy(camera.position);
 				// 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();
@@ -346,11 +346,11 @@
 						// 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;
-						// }
+						}
 					}
 			    }
 			}
@@ -389,6 +389,9 @@
 				moveTip(cameraNewPosition)
 				// console.warn("**moveCarmer***",lon,JSON.stringify(cameraNewPosition),JSON.stringify(targetNewPosition))
 				tweenCamera(camera.position,controls.target,cameraNewPosition,targetNewPosition,oldUp,newUp,2000);
+				setTimeout(()=> {
+					that.circleGroup.visible = false;
+				}, 2000);
 			}
 			//创建地标
 			function creatMoveTip(position){
@@ -410,6 +413,7 @@
 					});
 					that.circleGroup.add(circle);
 					scene.add(that.circleGroup);
+					that.circleGroup.visible = false;
 				}
 			}
 			//移动地标
@@ -427,6 +431,7 @@
 					that.circleGroup.add(circle);
 					scene.add(that.circleGroup);
 				}else{
+					that.circleGroup.visible = true;
 					that.circleGroup.children[0].position.set(position.x,0.01,position.z);
 				}
 			}
@@ -439,12 +444,13 @@
 				let targetNewPosition = obj.targetNewPosition;
 				let oldUp = {x:0,y:1,z:0};	//俯视
 				let newUp = {x:0,y:1,z:0};	//正视
-				moveTip(cameraNewPosition);
+				// moveTip(cameraNewPosition);
 				console.warn("**moveActor***",JSON.stringify(cameraNewPosition),JSON.stringify(targetNewPosition))
 				tweenCamera(camera.position,controls.target,cameraNewPosition,targetNewPosition,oldUp,newUp,2000);
 				lon = 0;
 				setTimeout(()=> {
 					attendEvent()
+					// that.circleGroup.visible = false;
 				}, 2000);
 			}
 			//初始化点位视角