|
@@ -310,8 +310,8 @@
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- this.$set(this.foundation,'spacing',maxWidth>maxHeight?maxHeight*0.8:maxWidth*0.8);
|
|
|
- this.$set(this.foundation,'visualDistance',maxWidth>maxHeight?maxWidth*0.8:maxHeight*0.8);
|
|
|
+ this.$set(this.foundation,'spacing',maxWidth>maxHeight?maxHeight*0.6:maxWidth*0.6);
|
|
|
+ this.$set(this.foundation,'visualDistance',maxWidth>maxHeight?maxWidth:maxHeight);
|
|
|
/*
|
|
|
* 创建场景对象Scene
|
|
|
*/
|
|
@@ -518,8 +518,8 @@
|
|
|
this.camera = new Three.PerspectiveCamera(75, this.container.clientWidth / this.container.clientHeight, 0.1, 3000)
|
|
|
//根据楼层间距与显示层数设定相机距离
|
|
|
this.camera.position.set(0,
|
|
|
- this.foundation.visualDistance*1.2,
|
|
|
- this.foundation.visualDistance*1.2)
|
|
|
+ this.foundation.visualDistance+(this.foundation.spacing*this.maxMapButtonList.length)*0.2,
|
|
|
+ this.foundation.visualDistance+(this.foundation.spacing*this.maxMapButtonList.length)*0.2)
|
|
|
/*
|
|
|
* 创建渲染器对象
|
|
|
*/
|
|
@@ -560,7 +560,7 @@
|
|
|
let t1 = new Date(); //本次时间
|
|
|
let t = t1 - t0; // 时间差
|
|
|
this.camera.rotateY(0.0001 * t / 3); //物体的均匀从左到又平移可以用相机旋转Y轴来实现
|
|
|
- this.controls.target = new Three.Vector3(0,((this.foundation.visualDistance/20)*this.maxMapButtonList.length),0);
|
|
|
+ this.controls.target = new Three.Vector3(0,((this.foundation.visualDistance/40)*(this.maxMapButtonList.length*4)),0);
|
|
|
this.renderer.render(this.scene, this.camera);
|
|
|
this.animateData = requestAnimationFrame(this.animate);
|
|
|
},
|