添加视角限制
This commit is contained in:
@@ -181,9 +181,12 @@ export default class Demo {
|
||||
this.camera,
|
||||
this.renderer.domElement
|
||||
);
|
||||
this.orbitControls.object.position.set(-27.285, 16.356, -54.925);
|
||||
//限制轨道控制器的视角变化
|
||||
this.orbitControls.maxPolarAngle = Math.PI * (3 / 5);
|
||||
//初始化轨道控制器
|
||||
this.orbitControls.object.position.set(-29, 18, -50)
|
||||
this.orbitControls.maxPolarAngle = Math.PI * (3.17 / 6);
|
||||
this.orbitControls.minPolarAngle = Math.PI * (2 / 6);
|
||||
this.orbitControls.minDistance = 19;
|
||||
this.orbitControls.maxDistance = 87;
|
||||
// 监听控制器变化
|
||||
this.orbitControls.addEventListener("end", handleEndChange.bind(this));
|
||||
this.orbitControls.addEventListener("start", handleStartChange.bind(this));
|
||||
|
||||
Reference in New Issue
Block a user