Browse Source

fix: 水牌回到屏保复位

v1.0.1
jiannibang 3 years ago
parent
commit
49854ecc32
  1. 16
      public/static/qm/MainMap_QM.js
  2. 2
      src/views/Billboard/Billboard.vue

16
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 = new THREE.DirectionalLight(0xffffff, 0.3)
this.light.name = 'light' this.light.name = 'light'
this.light.position.set(280, 400, -300) 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.scene.add(this.light)
this.mixers = [] this.mixers = []
@ -2352,7 +2342,7 @@ MainMap_QM.prototype = {
Map_QM.camera = cameraPerspective Map_QM.camera = cameraPerspective
Map_QM.controls.setZoom(1) Map_QM.controls.setZoom(1)
if (Config.cameraDist.state === '3D') { 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.object = Map_QM.camera
Map_QM.controls.maxPolarAngle = Math.PI / 2 - 0.3 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.object = Map_QM.camera
Map_QM.controls.setZoom(1) Map_QM.controls.setZoom(1)
if (Config.cameraDist.state === '3D') { 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.maxPolarAngle = Math.PI / 2 - 0.3
Map_QM.controls.minPolarAngle = 0.3 Map_QM.controls.minPolarAngle = 0.3
@ -3356,7 +3346,7 @@ MainMap_QM.prototype = {
} }
} }
} }
}, 100)
}, 500)
}, },
/** /**

2
src/views/Billboard/Billboard.vue

@ -104,7 +104,9 @@ Promise.all([getBrandListByFormat()]).then(([{ data: brandListByFormat }]) => {
try { try {
window.Map_QM?.showFloor?.(currentFloor.value.floorOrder) window.Map_QM?.showFloor?.(currentFloor.value.floorOrder)
setTimeout(() => {
window.Map_QM?.changeMapTo2D() window.Map_QM?.changeMapTo2D()
}, 500)
} catch (error) { } catch (error) {
console.log('error:', error) console.log('error:', error)
} }

Loading…
Cancel
Save