From 49854ecc322745d4d07ca6275b229ff0422afdd2 Mon Sep 17 00:00:00 2001 From: jiannibang <271381693@qq.com> Date: Mon, 6 Feb 2023 10:46:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B0=B4=E7=89=8C=E5=9B=9E=E5=88=B0?= =?UTF-8?q?=E5=B1=8F=E4=BF=9D=E5=A4=8D=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/qm/MainMap_QM.js | 16 +++------------- src/views/Billboard/Billboard.vue | 4 +++- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/public/static/qm/MainMap_QM.js b/public/static/qm/MainMap_QM.js index 2335a3f..5403c5f 100644 --- a/public/static/qm/MainMap_QM.js +++ b/public/static/qm/MainMap_QM.js @@ -1594,16 +1594,6 @@ MainMap_QM = function (callBack, backObj) { this.light = new THREE.DirectionalLight(0xffffff, 0.3) this.light.name = 'light' this.light.position.set(280, 400, -300) - if (Config.cameraDist.state === '3D') { - this.light.castShadow = true //阴影 - } - this.light.shadow.camera.top = 320 - this.light.shadow.camera.bottom = -320 - this.light.shadow.camera.right = 320 - this.light.shadow.camera.left = -320 - this.light.shadow.camera.far = 1200 - this.light.shadow.camera.near = 50 - this.light.shadow.mapSize.set(1024, 1024) this.scene.add(this.light) this.mixers = [] @@ -2352,7 +2342,7 @@ MainMap_QM.prototype = { Map_QM.camera = cameraPerspective Map_QM.controls.setZoom(1) if (Config.cameraDist.state === '3D') { - Map_QM.light.castShadow = true //阴影 + Map_QM.light.castShadow = false //阴影 } Map_QM.controls.object = Map_QM.camera Map_QM.controls.maxPolarAngle = Math.PI / 2 - 0.3 @@ -2389,7 +2379,7 @@ MainMap_QM.prototype = { Map_QM.controls.object = Map_QM.camera Map_QM.controls.setZoom(1) if (Config.cameraDist.state === '3D') { - Map_QM.light.castShadow = true //阴影 + Map_QM.light.castShadow = false //阴影 } Map_QM.controls.maxPolarAngle = Math.PI / 2 - 0.3 Map_QM.controls.minPolarAngle = 0.3 @@ -3356,7 +3346,7 @@ MainMap_QM.prototype = { } } } - }, 100) + }, 500) }, /** diff --git a/src/views/Billboard/Billboard.vue b/src/views/Billboard/Billboard.vue index 721eeec..7cb584f 100644 --- a/src/views/Billboard/Billboard.vue +++ b/src/views/Billboard/Billboard.vue @@ -104,7 +104,9 @@ Promise.all([getBrandListByFormat()]).then(([{ data: brandListByFormat }]) => { try { window.Map_QM?.showFloor?.(currentFloor.value.floorOrder) - window.Map_QM?.changeMapTo2D() + setTimeout(() => { + window.Map_QM?.changeMapTo2D() + }, 500) } catch (error) { console.log('error:', error) }