ThreeWorldEventMainQingXiCheAndQv.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. <script setup>
  2. import { watch } from "vue";
  3. import { CommonVal } from "@/components/ChengGuangYuanJing/store/CommonVal.js";
  4. import { QingXiCheAndQvMyThreeWorldStore } from "./store/QingXiCheAndQvMyThreeWorldStore.js";
  5. import ThreeWorldQingXiCheAndQv from "./ThreeWorldQingXiCheAndQv.vue";
  6. import { QingXiCheAndQvThreeWorldEventMain } from "./js/QingXiCheAndQvThreeWorldEventMain.js";
  7. import { QingXiCheAndQvCarEvent } from "./js/QingXiCheAndQvCarEvent.js";
  8. import { QingXiCheAndQvCarEventClick } from "./js/QingXiCheAndQvCarEventClick.js";
  9. import { QingXiCheAndQvComHighlightLayer } from "./js/QingXiCheAndQvComHighlightLayer.js";
  10. import { QingXiCheAndQvThreeWorldCamera } from "./js/QingXiCheAndQvThreeWorldCamera.js";
  11. import { WindowTxtStore } from "@/components/WindowQingXiCheAndQv/store/WindowTxtStore.js";
  12. import { WindowVideoStore } from "@/components/WindowQingXiCheAndQv/store/WindowVideoStore.js";
  13. import { WindowCountdownStore } from "@/components/WindowQingXiCheAndQv/store/WindowCountdownStore.js";
  14. import { ComMusic } from "../../utils/common/ComMusic.js";
  15. import { QingXiCheAndQvComRes } from "./js/QingXiCheAndQvComRes.js";
  16. import { WindowEvent } from "../WindowQingXiCheAndQv/js/WindowEvent.js";
  17. import { WindowVideoRemoveColorStore } from "@/components/WindowQingXiCheAndQv/store/WindowVideoRemoveColorStore.js";
  18. import { QingXiCheAndQvComClipPlaneMeshEvent } from "./js/QingXiCheAndQvComClipPlaneMeshEvent.js";
  19. import { QingXiCheAdnQvCarEventStep } from "./js/QingXiCheAdnQvCarEventStep.js";
  20. import { QingXiCheAndQvProcessEventStore } from "./event/store/QingXiCheAndQvProcessEventStore.js";
  21. import { CommonGuiDbListTwo } from "../../utils/common/CommonGuiDbListTwo.js";
  22. /**
  23. * 平时开发3d代码逻辑可以写这里
  24. * 更多的代码逻辑,建议用面向对象的方式去开发
  25. * 不然后面的逻辑会越来越复杂
  26. */
  27. /**
  28. * 举个例子,我们oss文件上传了,编辑器打包后的代码
  29. * 地址为 https://**.com/3dmodel/index.html
  30. *
  31. * 我们将对应的项目的3d模型,在了同域的地址是
  32. * https://**.com/自定义目录1/自定义目录2/model/
  33. *
  34. */
  35. // // 拼接出进入3d场景的地址,用于后续发布
  36. // let threeWorldUrl = "https://**.com/3dmodel/index.html#/main?id=zidingyi&user=zidingyi"
  37. // + '&commonconfig=https://**.com/自定义目录1/自定义目录2/model/'
  38. // + '&commonmodel=https://**.com/自定义目录1/自定义目录2/model/';
  39. // /**
  40. // * 本地开发调试固定地址
  41. // */
  42. // let threeWorldUrl = "3dMain/index.html#/main?id=zidingyi";
  43. // let commonconfig = "http://localhost:5173/3dMain/model_water_car_3/";
  44. // let commonmodel = "http://localhost:5173/3dMain/model_water_car_3/";
  45. // let threeWorldUrl = "3dMain/index.html#/main?id=zidingyi_lu_cun&user=zidingyi"
  46. // + '&commonconfig=' + commonconfig
  47. // + '&commonmodel=' + commonmodel;
  48. // let commonconfig = "https://www.3dyzt.com/waterMaintenance/3dMain/model_water_car_3/";
  49. // let commonmodel = "https://www.3dyzt.com/waterMaintenance/3dMain/model_water_car_3/";
  50. // let threeWorldUrl = "3dMain/index.html#/main?id=zidingyi_lu_cun&user=zidingyi"
  51. // + '&commonconfig=' + commonconfig
  52. // + '&commonmodel=' + commonmodel;
  53. // let hostUrl = import.meta.env.VITE_THREE_WORLD_URL;
  54. // let commonconfig = hostUrl + "/3dMain/model_water_car_6/";
  55. // let commonmodel = hostUrl + "/3dMain/model_water_car_6/";
  56. // let threeWorldUrl = "3dMain/index.html#/main?id=zidingyi_lu_cun&user=zidingyi"
  57. // + '&commonconfig=' + commonconfig
  58. // + '&commonmodel=' + commonmodel;
  59. // let hostUrl = import.meta.env.VITE_THREE_WORLD_URL;
  60. // let commonconfig = hostUrl + "/3dMain/model_water_car_7/";
  61. // let commonmodel = hostUrl + "/3dMain/model_water_car_7/";
  62. // let threeWorldUrl = "3dMain/index.html#/main?id=zidingyi_lu_cun&user=zidingyi"
  63. // + '&commonconfig=' + commonconfig
  64. // + '&commonmodel=' + commonmodel;
  65. let hostUrl = import.meta.env.VITE_THREE_WORLD_URL;
  66. let commonconfig = hostUrl + "/3dMain/model_water_car_8/";
  67. let commonmodel = hostUrl + "/3dMain/model_water_car_8/";
  68. let threeWorldUrl = "3dMain/index.html#/main?id=zidingyi_lu_cun&user=zidingyi"
  69. + '&commonconfig=' + commonconfig
  70. + '&commonmodel=' + commonmodel;
  71. /**
  72. * 回调加载百分比
  73. */
  74. const callbackLoadPercentageEvent = (json) => {
  75. // console.log("回调加载百分比", json);
  76. let loadPercentage = parseFloat(json["loadPercentage"]);
  77. if (loadPercentage == null || loadPercentage == undefined || loadPercentage < 0) {
  78. loadPercentage = 0;
  79. }
  80. QingXiCheAndQvMyThreeWorldStore().loadPercentage = loadPercentage;
  81. // 加载小于百分比
  82. if (loadPercentage < 100) {
  83. // ##############################【这里只做控制】隐藏其他按钮界面等
  84. CommonVal().loadSuccess = false;
  85. return;
  86. }
  87. }
  88. /**
  89. * 回调加载完成
  90. */
  91. const callbackLoadEndEvent = (json) => {
  92. // console.log("回调加载完成", json);
  93. QingXiCheAndQvMyThreeWorldStore().loadPercentage = 100;
  94. // 此时是显示角色的界面
  95. if (json["roleChoiceOpenBool"] === true) {
  96. // ############################## 隐藏其他按钮界面等
  97. CommonVal().loadSuccess = false;
  98. return;
  99. }
  100. // ############################## 这个时候,是真正的进入3d画面了,才显示其他按钮界面等
  101. CommonVal().loadSuccess = true;
  102. // 初始化操作3d的类对象,后续代码在这里面操作
  103. QingXiCheAndQvThreeWorldEventMain.find().initObj(
  104. CommonVal().obj.CommonValQingXiCheAndQv,
  105. CommonVal().obj.CommonValQingXiCheAndQv.objIframe,
  106. CommonVal().obj.CommonValQingXiCheAndQv.objIframe.ChengGuangYuanJing.CommonVal.find().objScene,
  107. CommonVal().obj.CommonValQingXiCheAndQv.objIframe.BABYLON
  108. );
  109. QingXiCheAndQvComHighlightLayer.find().init(
  110. QingXiCheAndQvThreeWorldEventMain.find()
  111. );
  112. QingXiCheAndQvThreeWorldCamera.find().initObj(
  113. CommonVal().obj.CommonValQingXiCheAndQv,
  114. CommonVal().obj.CommonValQingXiCheAndQv.objIframe,
  115. CommonVal().obj.CommonValQingXiCheAndQv.objIframe.ChengGuangYuanJing.CommonVal.find().objScene,
  116. CommonVal().obj.CommonValQingXiCheAndQv.objIframe.BABYLON
  117. );
  118. QingXiCheAndQvThreeWorldCamera.find().addConfig();
  119. QingXiCheAndQvCarEvent.find().objThreeWorldEventMain = QingXiCheAndQvThreeWorldEventMain.find();
  120. QingXiCheAndQvCarEventClick.find().objThreeWorldEventMain = QingXiCheAndQvThreeWorldEventMain.find();
  121. QingXiCheAndQvCarEventClick.find().QingXiCheAndQvProcessEventStore = QingXiCheAndQvProcessEventStore();
  122. QingXiCheAndQvComClipPlaneMeshEvent.find().objThreeWorldEventMain = QingXiCheAndQvThreeWorldEventMain.find();
  123. QingXiCheAndQvComClipPlaneMeshEvent.find().updateConfig();
  124. QingXiCheAdnQvCarEventStep.find().objThreeWorldEventMain = QingXiCheAndQvThreeWorldEventMain.find();
  125. // 新增被操作的 Store
  126. QingXiCheAndQvCarEvent.find().ComStore["WindowTxtStore"] = WindowTxtStore;
  127. QingXiCheAndQvCarEvent.find().ComStore["WindowVideoStore"] = WindowVideoStore;
  128. QingXiCheAndQvCarEvent.find().ComStore["WindowCountdownStore"] = WindowCountdownStore;
  129. WindowEvent.find().ComStore["WindowTxtStore"] = WindowTxtStore;
  130. WindowEvent.find().ComStore["WindowVideoStore"] = WindowVideoStore;
  131. WindowEvent.find().ComStore["WindowCountdownStore"] = WindowCountdownStore;
  132. WindowEvent.find().ComStore["WindowVideoRemoveColorStore"] = WindowVideoRemoveColorStore;
  133. // 初始化GUI会用到的对象
  134. CommonGuiDbListTwo.find().objScene = CommonVal().obj.CommonValQingXiCheAndQv.objIframe.ChengGuangYuanJing.CommonVal.find().objScene;
  135. CommonGuiDbListTwo.find().objEngine = CommonVal().obj.CommonValQingXiCheAndQv.objIframe.ChengGuangYuanJing.CommonVal.find().objEngine;
  136. CommonGuiDbListTwo.find().BABYLON = CommonVal().obj.CommonValQingXiCheAndQv.objIframe.BABYLON;
  137. // 配置自定义背景图
  138. CommonGuiDbListTwo.find().bgImgConfig = {
  139. "url" : new URL("../../utils/common/bg.webp", import.meta.url).href,
  140. "width" : 409,
  141. "height" : 304,
  142. }
  143. // console.log(
  144. // "三维场景初始化 ==========",
  145. // CommonGuiDbListTwo.find().bgImgConfig,
  146. // CommonVal().obj.CommonValQingXiCheAndQv.objIframe.ChengGuangYuanJing.CommonVal.find().objEngine
  147. // );
  148. configMusicEvent();
  149. configVideoEvent();
  150. setTimeout(function() {
  151. QingXiCheAndQvCarEvent.find().evnetInit_1();
  152. // QingXiCheAndQvThreeWorldEventMain.find().toFlyModel();
  153. QingXiCheAndQvThreeWorldEventMain.find().groundNoRemove();
  154. // QingXiCheAndQvThreeWorldEventMain.find().eyeNameLook("实验");
  155. // 自动触发模拟点击,解决加载完成后,在点击下,重新设置了材质,感觉会有问题
  156. CommonVal().obj.CommonValQingXiCheAndQv.objIframe.ChengGuangYuanJing.CommonVal.find().screenClickNumEvent();
  157. }, 1000);
  158. // }, 300);
  159. }
  160. /**
  161. * 配置用到的声音文件
  162. */
  163. const configMusicEvent = () => {
  164. ComMusic.find().codeJson["lightningOne"] = new URL("../../assets/res/music/lightningOne.mp3", import.meta.url).href;
  165. ComMusic.find().codeJson["lightningTwo"] = new URL("../../assets/res/music/lightningTwo.mp3", import.meta.url).href;
  166. ComMusic.find().codeJson["lightningThree"] = new URL("../../assets/res/music/lightningThree.mp3", import.meta.url).href;
  167. // ComMusic.find().play("lightningThree");
  168. }
  169. /**
  170. * 配置用到的视频地址文件 等其他文件
  171. */
  172. const configVideoEvent = () => {
  173. QingXiCheAndQvCarEvent.find().videoJson["02"] = new URL("../../assets/res/video/02.mp4", import.meta.url).href;
  174. QingXiCheAndQvCarEvent.find().videoJson["03"] = new URL("../../assets/res/video/03.mp4", import.meta.url).href;
  175. QingXiCheAndQvCarEvent.find().videoJson["04"] = new URL("../../assets/res/video/04.mp4", import.meta.url).href;
  176. QingXiCheAndQvCarEvent.find().videoJson["videw_liu_cheng_1"] = new URL("../../assets/res/video/videw_liu_cheng_1.mp4", import.meta.url).href;
  177. QingXiCheAndQvCarEvent.find().videoJson["videw_liu_cheng_2"] = new URL("../../assets/res/video/videw_liu_cheng_2.mp4", import.meta.url).href;
  178. QingXiCheAndQvComRes.find().resJson["img_shuang"] = new URL("../../assets/res/img/texture/shuang_shan.jpg", import.meta.url).href;
  179. // 打开车辆双闪,同时开启工作双闪灯
  180. QingXiCheAndQvComRes.find().resJson["QingXiChe_01"] = new URL("../../assets/res/mp4/01.mp4", import.meta.url).href;
  181. // 按下取力器开关
  182. QingXiCheAndQvComRes.find().resJson["QingXiChe_02"] = new URL("../../assets/res/mp4/02.mp4", import.meta.url).href;
  183. // 从水管固定座上拧下高压水管
  184. QingXiCheAndQvComRes.find().resJson["QingXiChe_03"] = new URL("../../assets/res/mp4/03.mp4", import.meta.url).href;
  185. // 确认手刹已拉起,档位是空档,然后发动车辆
  186. QingXiCheAndQvComRes.find().resJson["QingXiChe_04"] = new URL("../../assets/res/mp4/04.mp4", import.meta.url).href;
  187. // 取出高压水管并放入布管器内
  188. QingXiCheAndQvComRes.find().resJson["QingXiChe_05"] = new URL("../../assets/res/mp4/05.mp4", import.meta.url).href;
  189. // 在触屏操作面板上将管长清零
  190. QingXiCheAndQvComRes.find().resJson["QingXiChe_06"] = new URL("../../assets/res/mp4/06.mp4", import.meta.url).href;
  191. // 拆卸高压喷头放入喷头机箱内
  192. QingXiCheAndQvComRes.find().resJson["QingXiChe_07"] = new URL("../../assets/res/mp4/07.mp4", import.meta.url).href;
  193. // 关闭车辆双闪和工作双闪箭头灯
  194. QingXiCheAndQvComRes.find().resJson["QingXiChe_08"] = new URL("../../assets/res/mp4/08.mp4", import.meta.url).href;
  195. // 关闭取力器开关
  196. QingXiCheAndQvComRes.find().resJson["QingXiChe_09"] = new URL("../../assets/res/mp4/09.mp4", import.meta.url).href;
  197. // 将车辆正常熄火,恭喜你完成全部操作
  198. QingXiCheAndQvComRes.find().resJson["QingXiChe_10"] = new URL("../../assets/res/mp4/10.mp4", import.meta.url).href;
  199. // 调整卷筒器到合适位置
  200. QingXiCheAndQvComRes.find().resJson["QingXiChe_11"] = new URL("../../assets/res/mp4/11.mp4", import.meta.url).href;
  201. // 至触摸屏关闭冲水开关
  202. QingXiCheAndQvComRes.find().resJson["QingXiChe_12"] = new URL("../../assets/res/mp4/12.mp4", import.meta.url).href;
  203. // 打开车门进入驾驶室
  204. QingXiCheAndQvComRes.find().resJson["QingXiChe_13"] = new URL("../../assets/res/mp4/13.mp4", import.meta.url).href;
  205. // 疏通管道后减小油门到初始状态
  206. QingXiCheAndQvComRes.find().resJson["QingXiChe_14"] = new URL("../../assets/res/mp4/14.mp4", import.meta.url).href;
  207. // 踩下车辆离合器5秒
  208. QingXiCheAndQvComRes.find().resJson["QingXiChe_15"] = new URL("../../assets/res/mp4/15.mp4", import.meta.url).href;
  209. // 在施工范围放置警示标识
  210. QingXiCheAndQvComRes.find().resJson["QingXiChe_16"] = new URL("../../assets/res/mp4/16.mp4", import.meta.url).href;
  211. // 套上高压水管护管器
  212. QingXiCheAndQvComRes.find().resJson["QingXiChe_17"] = new URL("../../assets/res/mp4/17.mp4", import.meta.url).href;
  213. // 将高压水管放入待施工的管道内
  214. QingXiCheAndQvComRes.find().resJson["QingXiChe_18"] = new URL("../../assets/res/mp4/18.mp4", import.meta.url).href;
  215. // 回到驾驶室踩下车辆离合器5秒
  216. QingXiCheAndQvComRes.find().resJson["QingXiChe_19"] = new URL("../../assets/res/mp4/19.mp4", import.meta.url).href;
  217. // 安装合适的高压喷头
  218. QingXiCheAndQvComRes.find().resJson["QingXiChe_20"] = new URL("../../assets/res/mp4/20.mp4", import.meta.url).href;
  219. // 在安全的情况开启冲水开关
  220. QingXiCheAndQvComRes.find().resJson["QingXiChe_21"] = new URL("../../assets/res/mp4/21.mp4", import.meta.url).href;
  221. // 缓慢抬起离合器
  222. QingXiCheAndQvComRes.find().resJson["QingXiChe_22"] = new URL("../../assets/res/mp4/22.mp4", import.meta.url).href;
  223. // 下车确定安全灯显示是否正常
  224. QingXiCheAndQvComRes.find().resJson["QingXiChe_23"] = new URL("../../assets/res/mp4/23.mp4", import.meta.url).href;
  225. // 根据现场工况调节冲水压力
  226. QingXiCheAndQvComRes.find().resJson["QingXiChe_24"] = new URL("../../assets/res/mp4/24.mp4", import.meta.url).href;
  227. // 带压收回高压水管
  228. QingXiCheAndQvComRes.find().resJson["QingXiChe_25"] = new URL("../../assets/res/mp4/25.mp4", import.meta.url).href;
  229. // 将高压水管拧到水管固定座
  230. QingXiCheAndQvComRes.find().resJson["QingXiChe_26"] = new URL("../../assets/res/mp4/26.mp4", import.meta.url).href;
  231. // QingXiCheAndQvComRes.find().resJson["QingXiChe_01"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  232. // QingXiCheAndQvComRes.find().resJson["QingXiChe_02"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  233. // QingXiCheAndQvComRes.find().resJson["QingXiChe_03"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  234. // QingXiCheAndQvComRes.find().resJson["QingXiChe_04"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  235. // QingXiCheAndQvComRes.find().resJson["QingXiChe_05"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  236. // QingXiCheAndQvComRes.find().resJson["QingXiChe_06"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  237. // QingXiCheAndQvComRes.find().resJson["QingXiChe_07"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  238. // QingXiCheAndQvComRes.find().resJson["QingXiChe_08"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  239. // QingXiCheAndQvComRes.find().resJson["QingXiChe_09"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  240. // QingXiCheAndQvComRes.find().resJson["QingXiChe_10"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  241. // QingXiCheAndQvComRes.find().resJson["QingXiChe_11"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  242. // QingXiCheAndQvComRes.find().resJson["QingXiChe_12"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  243. // QingXiCheAndQvComRes.find().resJson["QingXiChe_13"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  244. // QingXiCheAndQvComRes.find().resJson["QingXiChe_14"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  245. // QingXiCheAndQvComRes.find().resJson["QingXiChe_15"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  246. // QingXiCheAndQvComRes.find().resJson["QingXiChe_16"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  247. // QingXiCheAndQvComRes.find().resJson["QingXiChe_17"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  248. // QingXiCheAndQvComRes.find().resJson["QingXiChe_18"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  249. // QingXiCheAndQvComRes.find().resJson["QingXiChe_19"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  250. // QingXiCheAndQvComRes.find().resJson["QingXiChe_20"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  251. // QingXiCheAndQvComRes.find().resJson["QingXiChe_21"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  252. // QingXiCheAndQvComRes.find().resJson["QingXiChe_22"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  253. // QingXiCheAndQvComRes.find().resJson["QingXiChe_23"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  254. // QingXiCheAndQvComRes.find().resJson["QingXiChe_24"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  255. // QingXiCheAndQvComRes.find().resJson["QingXiChe_25"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  256. // QingXiCheAndQvComRes.find().resJson["QingXiChe_26"] = new URL("../../assets/res/mp4/demo/01.mp4", import.meta.url).href;
  257. }
  258. /**
  259. * 回调距离范围内
  260. */
  261. const callbackDistanceYesEvent = (json) => {
  262. // console.log("回调距离范围内", json);
  263. }
  264. /**
  265. * 回调距离范围外
  266. */
  267. const callbackDistanceNoEvent = (json) => {
  268. // console.log("回调距离范围外", json);
  269. }
  270. /**
  271. * 回调视角切换完成
  272. */
  273. const callbackCameraVisualAngleJsonToLookEvent = (json) => {
  274. console.log("视角触发完成", json);
  275. let objIframe = CommonVal().obj.CommonValQingXiCheAndQv.objIframe;
  276. let objScene = objIframe.ChengGuangYuanJing.CommonVal.find().objScene;
  277. let BABYLON = objIframe.BABYLON;
  278. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  279. // 相机前后左右移动速度
  280. ChengGuangYuanJing.CameraArray.find().jsonCamera.speedMove = 0.03;
  281. // 相机QE上下移动速度
  282. ChengGuangYuanJing.CameraArray.find().jsonCamera.upDownSpeed = 0.03;
  283. // 更新相机参数
  284. ChengGuangYuanJing.CameraArray.find().activeCameraConfigUpdate();
  285. let objIframeEdit = CommonVal().obj.CommonValQingXiCheAndQv;
  286. if (json.name == '绕车1') {
  287. objIframeEdit.cameraVisualAngleGetListNameGpsTo("绕车2");
  288. }
  289. if (json.name == '绕车2') {
  290. objIframeEdit.cameraVisualAngleGetListNameGpsTo("绕车3");
  291. }
  292. if (json.name == '绕车3') {
  293. objIframeEdit.cameraVisualAngleGetListNameGpsTo("绕车4");
  294. }
  295. if (json.name == '绕车4') {
  296. objIframeEdit.cameraVisualAngleGetListNameGpsTo("绕车5");
  297. }
  298. if (json.name == '绕车5') {
  299. objIframeEdit.cameraVisualAngleGetListNameGpsTo("绕车6");
  300. }
  301. if (json.name == '绕车6') {
  302. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车-开门");
  303. }
  304. if (json.name == '调整坐姿') {
  305. objIframeEdit.cameraVisualAngleGetListNameGpsTo("手握方向盘");
  306. }
  307. if (json.name == '手握方向盘') {
  308. // objIframeEdit.cameraVisualAngleGetListNameGpsTo("踩下离合器踏板");
  309. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车踩离合5秒");
  310. }
  311. if (json.name == '回到驾驶室踩下车辆离合器5秒1') {
  312. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_打开左门', function() {
  313. objIframeEdit.cameraVisualAngleGetListNameGpsTo("回到驾驶室踩下车辆离合器5秒2");
  314. });
  315. }
  316. if (json.name == '清洗车流程完成') {
  317. QingXiCheAndQvCarEventClick.find().closeCarMen(function() {});
  318. }
  319. if (json.name == '清洗车打开车门') {
  320. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车进入副驾驶1");
  321. }
  322. if (json.name == '清洗车进入副驾驶1') {
  323. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车进入副驾驶2");
  324. }
  325. if (json.name == '清洗车下车_1') {
  326. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车下车_2");
  327. }
  328. }
  329. </script>
  330. <template>
  331. <div class="ThreeWorldEventMain">
  332. <ThreeWorldQingXiCheAndQv
  333. :iframeId="'CommonValQingXiCheAndQv'"
  334. :url="threeWorldUrl"
  335. @callbackLoadPercentage="callbackLoadPercentageEvent"
  336. @callbackLoadEnd="callbackLoadEndEvent"
  337. @callbackDistanceYes="callbackDistanceYesEvent"
  338. @callbackDistanceNo="callbackDistanceNoEvent"
  339. @callbackCameraVisualAngleJsonToLook="callbackCameraVisualAngleJsonToLookEvent"
  340. ></ThreeWorldQingXiCheAndQv>
  341. <img class="mengBan" src="../../assets/res/img/com/meng_ban.webp" />
  342. </div>
  343. </template>
  344. <style lang="less" scoped>
  345. .ThreeWorldEventMain * {
  346. -moz-user-select: none;
  347. -webkit-user-select: none;
  348. -ms-user-select: none;
  349. -khtml-user-select: none;
  350. user-select: none;
  351. }
  352. .ThreeWorldEventMain {
  353. position: fixed;
  354. top: 0px;
  355. left: 0px;
  356. width: 100%;
  357. height: 100%;
  358. z-index: 0;
  359. .mengBan {
  360. position: fixed;
  361. top: 0px;
  362. left: 0px;
  363. width: 100%;
  364. height: 100%;
  365. z-index: 1000;
  366. /* 注意这里必须是被允许穿透点击的,否则堆叠高于了 canvas,则会出现无法点击到canvas了。加了这个即可解决这个问题 */
  367. pointer-events: none;
  368. opacity: 0.3;
  369. }
  370. }
  371. </style>