zjs_project 1 ano atrás
pai
commit
a8853275a4

+ 1 - 1
src/main.js

@@ -39,7 +39,7 @@ window.echarts = echarts
 
 console.log('***process.env***', process.env);
 window.env = process.env.NODE_ENV;
-env = env == 'development' ? 'production' : env;
+env = env == 'development' ? 'test2' : env;
 window.$config = api(env);
 console.log("window.$config", window.$config);
 

+ 3 - 0
src/mixins/loadModel.js

@@ -219,6 +219,9 @@ export default {
 				realFurArr = [];
 				console.log("家具模型全部加载完成,时间:", endTime - startTime, this.gltfLayouts);
 				this.loadLastSpaceModel();//加载剩余空间的家具模型
+				// alert("JavaScript 堆大小限制: "+performance
+				// +"\n已使用的 JavaScript 堆大小: "+performance
+				// +"\nJavaScript 堆的总大小: "+performance.memory);
 			})
 		},
 		//过滤掉不需要的家具

+ 1 - 2
src/pages/webgl_rxdz/webgl_rxdz.vue

@@ -176,7 +176,7 @@
 			console.warn("***beforeDestroy-webgl_rxdz***");
 		},
         mounted() {
-			console.log("***onLoad-webgl_rxdz***", this.$route.query)
+			console.log("***onLoad-webgl_rxdz***", this.$route.query);
 			var that = this;
 			this.houseId = this.$store.state.houseId || '';
 			this.childLayout = this.$route.query.childLayout || 0;//4-测试户型
@@ -310,7 +310,6 @@
 						camera.position.y = 0;
 					}
 				});
-				// controls.target = new THREE.Vector3( that.controlStarPosition.x, that.controlStarPosition.y, that.controlStarPosition.z );;
 				// stats = new Stats();
 				// container.appendChild(stats.dom);
 				// stats.domElement.style.top = '100px';

+ 11 - 15
src/pages/webgl_rxdz_roam/webgl_rxdz_roam.vue

@@ -134,6 +134,9 @@
 		},
         mounted(options) {
 			var that = this;
+			// alert("JavaScript 堆大小限制: "+performance.memory.jsHeapSizeLimit
+			// +"\n已使用的 JavaScript 堆大小: "+performance.memory.usedJSHeapSize
+			// +"\nJavaScript 堆的总大小: "+performance.memory.totalJSHeapSize);
 			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)
@@ -370,10 +373,9 @@
 							spaceId = selectMesh.spaceId;
 						}
 						// let spaceId = that.gltfSpaces[index].spaceId;//获取选中实例的空间id
-						console.warn("***checkIntersection-地板***",mesh,floor,index,spaceId,that.spaceId)
+						console.warn("***checkIntersection-地板***",floor,index,spaceId,that.spaceId)
 						//当前拾取到的是本空间的底部-意味着用户点击了地板
 						if(floor && spaceId == that.spaceId){
-							// console.warn("***checkIntersection-地板***",mesh,floor)
 							moveCarmer(mesh.point);
 							return false;
 						}
@@ -408,7 +410,6 @@
 				}
 				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.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};	
@@ -472,7 +473,7 @@
 				let oldUp = {x:0,y:1,z:0};	//俯视
 				let newUp = {x:0,y:1,z:0};	//正视
 				// moveTip(cameraNewPosition);
-				console.warn("**moveActor***",JSON.stringify(cameraNewPosition),JSON.stringify(targetNewPosition))
+				// console.warn("**moveActor***",JSON.stringify(cameraNewPosition),JSON.stringify(targetNewPosition))
 				tweenCamera(camera.position,controls.target,cameraNewPosition,targetNewPosition,oldUp,newUp,2000);
 				lon = 0;
 				setTimeout(()=> {
@@ -535,15 +536,12 @@
 						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,defaulIndex)
+					// console.warn("*actors*",cube,defaulIndex)
 					that.actors.push(cube);//添加视角
 					if(index == defaulIndex){//隐藏当前视角
-						// cube.visible = false;
 						that.currentActor = cube;//记录下当前的视角对象 mesh网格模型
 						let param = {
 							type: 'CLK', //埋点类型
@@ -600,7 +598,6 @@
 					maxY = ((-spaceObj.centerY + (spaceObj.spaceHeight/2))/100 - 0.1);
 					minY = ((-spaceObj.centerY - (spaceObj.spaceHeight/2))/100 + 0.1);
 					//新的坐标轴不在房间范围内,则不能移动
-					// console.warn("**roamPositionHandle-观察点不在范围中****",JSON.stringify(cameraNewPosition),minX,maxX,minY,maxY)
 					if(cameraNewPosition.x<minX || cameraNewPosition.x>maxX
 					||cameraNewPosition.z<minY || cameraNewPosition.z>maxY){//不在房间范围
 						let _x = ((spaceObj.spaceWidth/2) - 15)*defaultActor.presentX + spaceObj.centerX;
@@ -705,7 +702,6 @@
 					// controls.target.y = object.y2;
 					// controls.target.z = object.z2;
 					// controls.update();
-					// console.warn("****onUpdate**",object.x1,object.y1,object.z1,object.x2,object.y2,object.z2)
 				}).onComplete(()=>{
 					controls.target.x = newT.x;
 					controls.target.y = newT.y;
@@ -760,9 +756,9 @@
 				handler(val) {
 					if (val) {
 						// setTimeout(()=> {
-						if(this.renderer){
-							this.setHouseDetail(val);
-						}
+						// if(this.renderer){
+						// 	this.setHouseDetail(val);
+						// }
 						// }, 1000);
 					}
 				},
@@ -859,7 +855,7 @@
                 }
 				let curSpaceArea = parseFloat((this.curSpaceObj.spaceWidth * this.curSpaceObj.spaceHeight) / 10000).toFixed(1);
 				this.navbar.title = this.curSpaceObj.spaceName + "  " + curSpaceArea + "㎡"
-                console.log("该户型空间数据:", this.spaceList);curSpaceArea
+                console.log("该户型空间数据:", this.spaceList);
                 console.log("当前选中的空间:", this.curSpaceObj);
 				this.positionCamer(this.curSpaceObj);
 				this.loaderSpaceArr(this.spaceList);//绘制地板
@@ -874,7 +870,7 @@
 				}else{
 					let data = {id:this.wallIds}
 					const res = await requestConfig('getHouseTypeSpaceWalls', data, true);
-					console.log("墙体数据:", res.list)
+					// console.log("墙体数据:", res.list)
 					if(res.success){
 					    wallList = this.wallList = res.list;
 					}