From 79603e53c78e535dba4bfbc69b8c3b5c184012c5 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期一, 08 四月 2024 09:16:05 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/drawer/shelf/shelfThree.js | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/drawer/shelf/shelfThree.js b/zy-asrs-flow/src/pages/map/drawer/shelf/shelfThree.js
index 58ee56c..019533c 100644
--- a/zy-asrs-flow/src/pages/map/drawer/shelf/shelfThree.js
+++ b/zy-asrs-flow/src/pages/map/drawer/shelf/shelfThree.js
@@ -64,9 +64,6 @@
initScene = () => {
const scene = new THREE.Scene();
- // scene.background = new THREE.Color(0xf0f0f0);
- // scene.background = new THREE.Color(0x333333);
-
// scene.background = new THREE.Color(0xf8f8f8);
scene.background = new THREE.Color(0x7a7a7a);
scene.fog = new THREE.Fog(scene.background, 1, 5000);
@@ -203,6 +200,12 @@
}
}
+ rePerspective = (maxHeight) => {
+ const cameraPosScale = 0.7;
+ this.camera.position.set(-maxHeight * cameraPosScale, maxHeight * cameraPosScale, maxHeight * cameraPosScale);
+ this.controls.target = new THREE.Vector3(0, maxHeight * 0.53, 0);
+ }
+
destroy = () => {
cancelAnimationFrame(this.animationFrame);
window.removeEventListener('resize', this.resizeHandler);
--
Gitblit v1.9.1