zjs_project 1 年間 前
コミット
143e595734
2 ファイル変更30 行追加6 行削除
  1. 30 2
      src/components/webglCom/webglCom.vue
  2. 0 4
      src/mixins/wallMethod.js

+ 30 - 2
src/components/webglCom/webglCom.vue

@@ -228,14 +228,14 @@
 				container.appendChild( renderer.domElement );
 				
 				controls = new OrbitControls(camera, renderer.domElement);
-				controls.screenSpacePanning = true;
+				controls.screenSpacePanning = false;//设置为false,则双指平移时是不会翻转垂直的
+				controls.enableDamping = true;
 				controls.minDistance = 1;
 				controls.maxDistance = 400;
 				controls.minPolarAngle = 0;// 默认0
 				controls.maxPolarAngle = Math.PI / 2; // 默认Math.PI,即可以向下旋转到的视角。
 				controls.target.set(that.controlStarPosition.x, that.controlStarPosition.y, that.controlStarPosition.z);
 				controls.enableZoom = true;//启用摄像机的缩放
-				controls.enableDamping = true;
 				
 				// stats = new Stats();
 				// container.appendChild(stats.dom);
@@ -858,9 +858,37 @@
 					that.showLables = false;//隐藏lable
 					that.scene.remove(...deleList);
 				}
+				// this.scene.traverse(function(object) {
+				// 	if (object instanceof THREE.Mesh) {
+				// 		if(object.geometry && typeof(object.geometry.dispose)=='function'){
+				// 			object.geometry.dispose();
+				// 		}
+				// 		if(object.material && typeof(object.material.dispose)=='function'){
+				// 			object.material.dispose();
+				// 		}
+				// 		if(object.texture && typeof(object.texture.dispose)=='function'){
+				// 			object.texture.dispose();
+				// 		}
+				// 		object.dispose();
+				// 	}
+				// 	if (object instanceof THREE.InstancedMesh) {
+				// 		if(object.geometry && typeof(object.geometry.dispose)=='function'){
+				// 			object.geometry.dispose();
+				// 		}
+				// 		if(object.material && typeof(object.material.dispose)=='function'){
+				// 			object.material.dispose();
+				// 		}
+				// 		if(object.texture && typeof(object.texture.dispose)=='function'){
+				// 			object.texture.dispose();
+				// 		}
+				// 		object.dispose();
+				// 	}
+				// });
+				this.progress = 0;
 				this.gltfWalls = [];
 				this.gltfSpaces = [];
 				this.gltfSpaceRoofs = [];
+				this.gltfAutoWalls = [];
 				this.instancedMeshList = [];
 				this.instancedSpaceMeshList = [];
 				this.instancedFurList = [];

+ 0 - 4
src/mixins/wallMethod.js

@@ -2307,10 +2307,6 @@ export default {
 					pz = (Math.max(leftMaxValue, rightMaxValue) - cubeW / 2) / 100
 					sz = cubeW / 10;
 				}
-
-
-
-
 			} else {
 				let leftMinValue = 0;
 				for (let index = 0; index < this.leftSpaces.length; index++) {