| | |
| | | tilesetLayer: null, //2.5d模型 |
| | | usetowpointfive: null, |
| | | tilesetLayer: null, //瀑布流 |
| | | |
| | | audioData: null, //语音 |
| | | }, |
| | | mutations: { |
| | | MSET_VIEWER(state, viewer) { |
| | |
| | | // state.mviewer.flyTo(state.tileset); |
| | | |
| | | //3D视角不限制 |
| | | state.mviewer.scene.screenSpaceCameraController.minimumZoomDistance = 100; |
| | | state.mviewer.scene.screenSpaceCameraController.minimumZoomDistance = 80; |
| | | // 最大 |
| | | state.mviewer.scene.screenSpaceCameraController.maximumZoomDistance = 4000000; |
| | | // 设置相机缩小时的速率 |
| | | state.mviewer.scene.screenSpaceCameraController._minimumZoomRate = 3000; |
| | | state.mviewer.scene.screenSpaceCameraController._minimumZoomRate = 10000; |
| | | // 设置相机放大时的速率 |
| | | state.mviewer.scene.screenSpaceCameraController._maximumZoomRate = 3000; |
| | | state.mviewer.scene.screenSpaceCameraController._maximumZoomRate = 5906376272000; |
| | | // 视角平移 |
| | | state.mviewer.scene.screenSpaceCameraController.enableRotate = true; |
| | | // 视角缩放 |
| | |
| | | }; |
| | | state.tilesetLayer.show = false; //隐藏3d图形 |
| | | state.newLayer = state.usetowpointfive(); //添加2.5d图形贴片 |
| | | state.wallLayer.show = true; //打开瀑布 |
| | | state.wallLayer.show = false; //打开瀑布 |
| | | state.startPointFn(); //移动默认视角 |
| | | |
| | | //2.5D视角限制 |
| | |
| | | if (!state.MobileWindowsHide && state.popupsDom) { |
| | | state.popupsDom.closeOur(); |
| | | commit("MSET_MOBILEWINDOWSHIDE", true); |
| | | } |
| | | if (state.audioData) { |
| | | state.audioData = null; |
| | | window.speechSynthesis.cancel(); |
| | | } |
| | | } //cancel |
| | | }, |
| | | CHANGETOC3({ state, commit }, data) { |
| | | // //转换经纬度坐标 成世界坐标cartesian3 |
| | |
| | | }, |
| | | }); |
| | | }, |
| | | MSET_GETAUDIO({ state, commit, dispatch }, val) { |
| | | if (state.audioData) { |
| | | state.audioData = null; |
| | | window.speechSynthesis.cancel(); |
| | | } else { |
| | | state.audioData = new window.SpeechSynthesisUtterance(); |
| | | state.audioData.text = val; |
| | | window.speechSynthesis.speak(state.audioData); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | |