From cc6994a5858cd662f5904005bbbd9d34b712f76c Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期五, 19 四月 2024 11:56:25 +0800
Subject: [PATCH] feat:添加地图label

---
 src/views/screen/components/screen-map-three/experience/camera.js |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/views/screen/components/screen-map-three/experience/camera.js b/src/views/screen/components/screen-map-three/experience/camera.js
index 792beeb..8a541f2 100644
--- a/src/views/screen/components/screen-map-three/experience/camera.js
+++ b/src/views/screen/components/screen-map-three/experience/camera.js
@@ -1,3 +1,4 @@
+import {MathUtils} from 'three';
 import { PerspectiveCamera, CameraHelper } from 'three';
 import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
 
@@ -26,6 +27,10 @@
         this.controls = new OrbitControls(this.instance, this.canvas);
         this.controls.target.set(0, 0, 5);
         this.controls.enableDamping = true;
+        this.controls.minDistance = 20;
+        this.controls.maxDistance = 80;
+        this.controls.maxPolarAngle = MathUtils.degToRad(80);
+        // this.controls.maxPolarAngle = (-Math.PI / 2);
     }
 
     resize() {

--
Gitblit v1.8.0