|
@@ -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 = [];
|