ソースを参照

模型限制旋转范围

luogang 5 ヶ月 前
コミット
64b88b9ed9
1 ファイル変更5 行追加0 行削除
  1. 5 0
      ems-ui-cloud/src/views/largeScreen/three/renderModel.js

+ 5 - 0
ems-ui-cloud/src/views/largeScreen/three/renderModel.js

@@ -117,6 +117,11 @@ class renderModel {
   initControls() {
     this.controls = new OrbitControls(this.camera, this.renderer.domElement);
     this.controls.enableDamping = true;
+    this.controls.screenSpacePanning = false;
+    this.controls.maxPolarAngle = Math.PI/1.1 ;
+    this.controls.minPolarAngle = Math.PI/2 ;
+    this.controls.minAzimuthAngle = 0 ;
+    this.controls.maxAzimuthAngle =  0 ;
     this.controls.maxDistance = 2000;
     //标签控制器
     this.css3dControls = new OrbitControls(this.camera, this.css3DRenderer.domElement);