QingXiCheAndQvCarEventClick.js 106 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663
  1. import { QingXiCheAndQvCarEvent } from "./QingXiCheAndQvCarEvent.js";
  2. import { QingXiCheAndQvComHighlightLayer } from "./QingXiCheAndQvComHighlightLayer.js";
  3. import { ComVal } from "../common/ComVal.js";
  4. import { WindowEvent } from "../../WindowQingXiCheAndQv/js/WindowEvent.js";
  5. import { QingXiCheAndQvComRes } from '../js/QingXiCheAndQvComRes.js';
  6. import { QingXiCheAndQvComClipPlaneMeshEvent } from './QingXiCheAndQvComClipPlaneMeshEvent.js';
  7. import { QingXiCheAdnQvCarEventStep } from './QingXiCheAdnQvCarEventStep.js';
  8. import { ElMessage, ElMessageBox } from 'element-plus';
  9. /**
  10. * 操作清洗车仿真 点击物体的时候触发 逻辑
  11. */
  12. export class QingXiCheAndQvCarEventClick {
  13. // 每次 new 出对象则会调用这个构造函数
  14. constructor() {
  15. /**
  16. * 三维世界对象 src\components\ThreeWorldEvent\js\QingXiCheAndQvThreeWorldEventMain.js
  17. */
  18. this.objThreeWorldEventMain = null;
  19. /**
  20. * 当前移动的物体列表,和对应的参数
  21. * 当数组存在目标的时候,则 拖拽的时候,目标物体跟着鼠标移动
  22. */
  23. this.moveMeshList = [];
  24. // 记录第一次点击拖拽时候的坐标
  25. this.moveMeshListClick = {
  26. "x" : 0, "y" : 0, "z" : 0
  27. };
  28. /**
  29. * 当前这些参数不等于null的时候,则说明再拖拽移动目标物体
  30. * 此时固定相机的坐标,和视角
  31. */
  32. this.moveCameraRadius = null;
  33. this.moveCameraAlpha = null;
  34. this.moveCameraBeta = null;
  35. // 记录最后因为 this.moveMeshList 逻辑,鼠标移动的坐标
  36. this.moveCoordinate = {
  37. "x" : 0, "y" : 0, "z" : 0
  38. };
  39. // 是否开启每帧判断的逻辑
  40. this.renderEventBool = false;
  41. // 记录 QingXiCheAndQvProcessEventStore
  42. this.QingXiCheAndQvProcessEventStore = null;
  43. }
  44. // 实现单例模式
  45. static find() {
  46. if (!QingXiCheAndQvCarEventClick.instance) {
  47. QingXiCheAndQvCarEventClick.instance = new QingXiCheAndQvCarEventClick();
  48. }
  49. return QingXiCheAndQvCarEventClick.instance;
  50. }
  51. /**
  52. * 鼠标点击的时候
  53. * pickResult 点击的具体坐标,物体等信息
  54. */
  55. clickMeshEvent = function(pickResult) {
  56. let thisClass = this;
  57. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  58. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  59. let objIframe = objThreeWorldEventMain.objIframe;
  60. let objScene = objThreeWorldEventMain.objScene;
  61. let BABYLON = objThreeWorldEventMain.BABYLON;
  62. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  63. // console.log(
  64. // "鼠标点击的时候", pickResult
  65. // );
  66. // 处理中则不做处理
  67. if (QingXiCheAndQvCarEvent.find().eventEnd != 0) {
  68. return this;
  69. }
  70. let type = QingXiCheAndQvCarEvent.find().eventName;
  71. let meshMoveConfig = thisClass.meshMoveConfig(type);
  72. if (meshMoveConfig == null) {
  73. thisClass.moveMeshListReset();
  74. return;
  75. }
  76. // 目标物体
  77. let pickedMesh = pickResult["pickedMesh"];
  78. if (typeof pickedMesh["id"] != "string") {
  79. return;
  80. }
  81. let meshId = pickedMesh["id"];
  82. // 点击的坐标
  83. let pickedPoint = pickResult["pickedPoint"];
  84. let meshList = meshMoveConfig["meshList"];
  85. let meshJson = meshMoveConfig["meshJson"];
  86. // 点击的不是在物体的列表里的时候
  87. if (meshJson[meshId] == null || meshJson[meshId] == undefined) {
  88. thisClass.moveMeshListReset();
  89. return;
  90. }
  91. let objSceneActiveCamera = ChengGuangYuanJing.CommonVal.find().objSceneActiveCamera;
  92. thisClass.moveCameraRadius = objSceneActiveCamera.radius;
  93. thisClass.moveCameraAlpha = objSceneActiveCamera.alpha;
  94. thisClass.moveCameraBeta = objSceneActiveCamera.beta;
  95. thisClass.moveMeshListClick = {
  96. "x" : pickedPoint.x, "y" : pickedPoint.y, "z" : pickedPoint.z
  97. };
  98. console.log(
  99. "thisClass.moveMeshListClick",
  100. thisClass.moveMeshListClick
  101. );
  102. thisClass.moveMeshList = [];
  103. // 记录点击的时候的物体的坐标
  104. for (let i = 0; i < meshList.length; i++) {
  105. let thisMeshId = meshList[i];
  106. let thisObjMesh = objScene.getMeshById(thisMeshId);
  107. if (thisObjMesh != null && thisObjMesh != undefined) {
  108. // 设置为不可选中
  109. thisObjMesh.isPickable = false;
  110. let addJson = {
  111. "meshId" : thisObjMesh.id,
  112. "x" : thisObjMesh.absolutePosition.x,
  113. "y" : thisObjMesh.absolutePosition.y,
  114. "z" : thisObjMesh.absolutePosition.z,
  115. };
  116. thisClass.moveMeshList.push(
  117. // 必须转换下,这样就是独立的对象
  118. JSON.parse(JSON.stringify(addJson))
  119. );
  120. }
  121. }
  122. return thisClass;
  123. }
  124. /**
  125. * 重置为不是拖拽逻辑
  126. */
  127. moveMeshListReset = function() {
  128. let thisClass = this;
  129. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  130. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  131. let objIframe = objThreeWorldEventMain.objIframe;
  132. let objScene = objThreeWorldEventMain.objScene;
  133. let BABYLON = objThreeWorldEventMain.BABYLON;
  134. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  135. // 先将对应的物体,恢复可以选中
  136. if (thisClass.moveMeshList.length > 0) {
  137. for (let i = 0; i < thisClass.moveMeshList.length; i++) {
  138. let thisConfig = thisClass.moveMeshList[i];
  139. let thisMeshId = thisConfig["meshId"];
  140. let thisObjMesh = objScene.getMeshById(thisMeshId);
  141. if (thisObjMesh != null && thisObjMesh != undefined) {
  142. // 设置为可选中
  143. thisObjMesh.isPickable = true;
  144. }
  145. }
  146. }
  147. thisClass.moveMeshList = [];
  148. thisClass.moveCameraRadius = null;
  149. thisClass.moveCameraAlpha = null;
  150. thisClass.moveCameraBeta = null;
  151. }
  152. /**
  153. * 更新被拖拽物体的位置
  154. */
  155. moveMeshListCoordinateUpdate = function() {
  156. let thisClass = this;
  157. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  158. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  159. let objIframe = objThreeWorldEventMain.objIframe;
  160. let objScene = objThreeWorldEventMain.objScene;
  161. let BABYLON = objThreeWorldEventMain.BABYLON;
  162. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  163. if (thisClass.moveMeshList.length > 0) {
  164. // 追加的xyz坐标
  165. var addPosition = {
  166. "x" : thisClass.moveCoordinate.x - thisClass.moveMeshListClick.x,
  167. "y" : thisClass.moveCoordinate.y - thisClass.moveMeshListClick.y,
  168. "z" : thisClass.moveCoordinate.z - thisClass.moveMeshListClick.z,
  169. };
  170. for (let i = 0; i < thisClass.moveMeshList.length; i++) {
  171. let thisConfig = thisClass.moveMeshList[i];
  172. let thisMeshId = thisConfig["meshId"];
  173. let thisObjMesh = objScene.getMeshById(thisMeshId);
  174. if (thisObjMesh != null && thisObjMesh != undefined) {
  175. // 一定要用绝对坐标更新,这样才可以解决不同模型轴向,问题导致设置 position 会各种出错
  176. thisObjMesh.setAbsolutePosition(
  177. new BABYLON.Vector3(
  178. parseFloat(thisConfig["x"]) + addPosition.x,
  179. parseFloat(thisConfig["y"]) + addPosition.y,
  180. parseFloat(thisConfig["z"]) + addPosition.z
  181. )
  182. );
  183. }
  184. }
  185. }
  186. }
  187. /**
  188. * 将当前的物体列表,回归到最初原始的坐标位置
  189. */
  190. moveMeshListResetPosition = function () {
  191. let thisClass = this;
  192. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  193. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  194. let objIframe = objThreeWorldEventMain.objIframe;
  195. let objScene = objThreeWorldEventMain.objScene;
  196. let BABYLON = objThreeWorldEventMain.BABYLON;
  197. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  198. if (thisClass.moveMeshList.length > 0) {
  199. for (let i = 0; i < thisClass.moveMeshList.length; i++) {
  200. let thisConfig = thisClass.moveMeshList[i];
  201. let thisMeshId = thisConfig["meshId"];
  202. let thisObjMesh = objScene.getMeshById(thisMeshId);
  203. if (thisObjMesh != null && thisObjMesh != undefined) {
  204. // 一定要用绝对坐标更新,这样才可以解决不同模型轴向,问题导致设置 position 会各种出错
  205. thisObjMesh.setAbsolutePosition(
  206. new BABYLON.Vector3(
  207. parseFloat(thisConfig["x"]),
  208. parseFloat(thisConfig["y"]),
  209. parseFloat(thisConfig["z"])
  210. )
  211. );
  212. }
  213. }
  214. }
  215. }
  216. /**
  217. * 鼠标移动的时候
  218. * pickResult 点击的具体坐标,物体等信息
  219. */
  220. clickMoveMeshEvent = function(pickResult) {
  221. let thisClass = this;
  222. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  223. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  224. let objIframe = objThreeWorldEventMain.objIframe;
  225. let objScene = objThreeWorldEventMain.objScene;
  226. let BABYLON = objThreeWorldEventMain.BABYLON;
  227. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  228. // console.log(
  229. // "鼠标移动的时候", pickResult
  230. // );
  231. // 处理中则不做处理
  232. if (QingXiCheAndQvCarEvent.find().eventEnd != 0) {
  233. return this;
  234. }
  235. // 此时移动的坐标
  236. let pickedPoint = pickResult["pickedPoint"];
  237. thisClass.moveCoordinate = {
  238. "x" : pickedPoint.x, "y" : pickedPoint.y, "z" : pickedPoint.z
  239. };
  240. thisClass.moveMeshListCoordinateUpdate();
  241. return thisClass;
  242. }
  243. /**
  244. * 判断是否拖拽到指定的坐标范围了
  245. * 范围内 返回 true , 否则返回 false
  246. */
  247. dragBool = function() {
  248. let thisClass = this;
  249. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  250. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  251. let objIframe = objThreeWorldEventMain.objIframe;
  252. let objScene = objThreeWorldEventMain.objScene;
  253. let BABYLON = objThreeWorldEventMain.BABYLON;
  254. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  255. // 当没有被点击的物体的时候,说明该逻辑是没有拖拽到附近的
  256. if (thisClass.moveMeshList.length <= 0) {
  257. return false;
  258. }
  259. // 最终应该拖拽到哪个坐标附近
  260. let targetPosition = {
  261. "x" : -0.00247241766192019,
  262. "y" : -0.8081836700439453,
  263. "z" : 36.005401611328125,
  264. }
  265. // 得到两点之间的距离
  266. let thisVector3distanceTo = BABYLON.Vector3.Distance(
  267. new BABYLON.Vector3(parseFloat(targetPosition.x), parseFloat(targetPosition.y), parseFloat(targetPosition.z)),
  268. new BABYLON.Vector3(parseFloat(thisClass.moveCoordinate.x), parseFloat(thisClass.moveCoordinate.y), parseFloat(thisClass.moveCoordinate.z))
  269. );
  270. // console.log(
  271. // "拖拽后的距离", thisVector3distanceTo
  272. // );
  273. if (thisVector3distanceTo <= 0.5) {
  274. return true;
  275. }
  276. return false;
  277. }
  278. /**
  279. * 每帧被执行,用于判断距离等情况使用
  280. */
  281. renderEvent = () => {
  282. let thisClass = this;
  283. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  284. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  285. let objIframe = objThreeWorldEventMain.objIframe;
  286. let objScene = objThreeWorldEventMain.objScene;
  287. let BABYLON = objThreeWorldEventMain.BABYLON;
  288. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  289. if (thisClass.renderEventBool == false) {
  290. return this;
  291. }
  292. if (QingXiCheAndQvCarEvent.find().eventEnd != 0) {
  293. return this;
  294. }
  295. let type = QingXiCheAndQvCarEvent.find().eventName;
  296. // console.log("每帧 renderEvent ---", type);
  297. switch (type) {
  298. case '行至车辆区域':
  299. let roleAndPositionTargetBool = objThreeWorldEventMain.roleAndPositionTargetBool();
  300. if (roleAndPositionTargetBool == true) {
  301. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  302. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  303. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  304. thisClass.renderEventBool = false;
  305. // 记录当前的视角,解决人物,切换到新的视角的时候,会出现一个很长的过度问题
  306. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  307. thisClass.downTimeEvent();
  308. }
  309. break;
  310. case '绕车一周':
  311. // console.log("绕车一周 每帧执行");
  312. let aroundTheCarPointBool = objThreeWorldEventMain.aroundTheCarPointBool();
  313. // console.log("绕车一周 每帧执行 ---", aroundTheCarPointBool);
  314. if (aroundTheCarPointBool == true) {
  315. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  316. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  317. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  318. thisClass.renderEventBool = false;
  319. // 记录当前的视角,解决人物,切换到新的视角的时候,会出现一个很长的过度问题
  320. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  321. thisClass.downTimeEvent();
  322. }
  323. break;
  324. }
  325. }
  326. /**
  327. * 统一处理完成当前任务的逻辑
  328. */
  329. downTimeEvent = () => {
  330. let thisClass = this;
  331. ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
  332. confirmButtonClass : 'el-button--success',
  333. confirmButtonText: '下一步',
  334. callback: (action) => {
  335. thisClass.QingXiCheAndQvProcessEventStore.obj.downTime = "" + new Date().getTime();
  336. },
  337. });
  338. }
  339. /**
  340. * 鼠标弹起的时候
  341. * 根据点击到的物体,和当前的流程,触发对应的逻辑
  342. * pickResult 点击的具体坐标,物体等信息
  343. */
  344. main = (pickResult) => {
  345. let thisClass = this;
  346. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  347. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  348. let objIframe = objThreeWorldEventMain.objIframe;
  349. let objScene = objThreeWorldEventMain.objScene;
  350. let BABYLON = objThreeWorldEventMain.BABYLON;
  351. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  352. console.log("typeClick 111111", QingXiCheAndQvCarEvent.find().eventName, QingXiCheAndQvCarEvent.find().eventEnd);
  353. if (QingXiCheAndQvCarEvent.find().eventEnd != 0) {
  354. return this;
  355. }
  356. console.log("typeClick 222222", QingXiCheAndQvCarEvent.find().eventName, QingXiCheAndQvCarEvent.find().eventEnd);
  357. var objMesh = pickResult.pickedMesh;
  358. var objPosition = pickResult.pickedPoint;
  359. // 获取点击对象的方向【 一定要加上 true,否则载入的获取模型的方向,会有问题 】
  360. // eslint-disable-next-line no-unused-vars
  361. var getNormal = pickResult.getNormal(true);
  362. let type = QingXiCheAndQvCarEvent.find().eventName;
  363. let dragBool = thisClass.dragBool();
  364. switch(type) {
  365. // 仿真模拟
  366. case '仿真模拟':
  367. break;
  368. // 人物换装
  369. case '人物换装':
  370. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  371. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  372. // 切换成正在处理中
  373. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  374. // 切换视角
  375. objIframeEdit.modelPeopleLook(3);
  376. objIframeEdit.cameraVisualAngleGetListNameGpsTo("穿衣服_2");
  377. objIframeEdit.roleShow(false);
  378. let thisTime = new Date().getTime();
  379. // 控制延迟逻辑
  380. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  381. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  382. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('人物换装_鞋子', function() {
  383. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('人物换装_裤子', function() {
  384. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('人物换装_上衣', function() {
  385. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('人物换装_安全帽', function() {
  386. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  387. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  388. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  389. thisClass.downTimeEvent();
  390. });
  391. });
  392. });
  393. });
  394. });
  395. }
  396. break;
  397. // 打开车门进入驾驶室
  398. case '打开车门进入驾驶室':
  399. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  400. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  401. // 切换成正在处理中
  402. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  403. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_打开左门', function() {
  404. // 切换视角
  405. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  406. objIframeEdit.modelPeopleLook(3);
  407. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车打开车门");
  408. objIframeEdit.roleShow(false);
  409. let thisTime = new Date().getTime();
  410. // 控制延迟逻辑
  411. // ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  412. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500 * 3, function(fpsEventAddRet) {
  413. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  414. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车确定车辆双闪和工作箭头等是否正常");
  415. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  416. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  417. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_关门', function() {
  418. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车进入副驾驶2");
  419. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  420. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  421. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  422. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  423. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  424. thisClass.downTimeEvent();
  425. });
  426. });
  427. });
  428. });
  429. });
  430. }
  431. break;
  432. // 确认手刹已拉起档位是P档然后发动车辆
  433. case '确认手刹已拉起档位是P档然后发动车辆':
  434. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  435. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  436. // 切换成正在处理中
  437. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  438. // 切换视角
  439. objIframeEdit.modelPeopleLook(3);
  440. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车切换挡位到空挡");
  441. objIframeEdit.roleShow(false);
  442. let thisTime = new Date().getTime();
  443. // 控制延迟逻辑
  444. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  445. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  446. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  447. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  448. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  449. thisClass.downTimeEvent();
  450. });
  451. }
  452. break;
  453. // 发动车辆
  454. case '发动车辆':
  455. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  456. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  457. // 切换成正在处理中
  458. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  459. // 切换视角
  460. objIframeEdit.modelPeopleLook(3);
  461. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车启动车辆");
  462. objIframeEdit.roleShow(false);
  463. let thisTime = new Date().getTime();
  464. // 控制延迟逻辑
  465. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  466. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  467. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_旋转钥匙', function() {
  468. QingXiCheAndQvCarEvent.find().carOpen(true);
  469. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  470. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  471. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  472. thisClass.downTimeEvent();
  473. // // 切换视角
  474. // objIframeEdit.modelPeopleLook(3);
  475. // objIframeEdit.cameraVisualAngleGetListNameGpsTo("拧动钥匙发动车辆向上");
  476. // objIframeEdit.roleShow(false);
  477. // thisTime = new Date().getTime();
  478. // // 控制延迟逻辑
  479. // ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  480. // ComVal.find().fpsEventDel(fpsEventAddRet.code);
  481. // QingXiCheAndQvCarEvent.find().eventEnd = 2;
  482. // QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  483. // QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  484. // });
  485. });
  486. });
  487. }
  488. break;
  489. // 打开车辆双闪同时开启工作双闪灯
  490. case '打开车辆双闪同时开启工作双闪灯':
  491. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  492. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  493. // 控制延迟逻辑
  494. ComVal.find().fpsEventAdd("type_click_" + new Date().getTime(), {}, 1000, function(fpsEventAddRet) {
  495. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  496. // 切换成正在处理中
  497. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  498. QingXiCheAndQvCarEvent.find().carShuangShanOpen(true);
  499. // 切换视角
  500. objIframeEdit.modelPeopleLook(3);
  501. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车开启双闪");
  502. objIframeEdit.roleShow(false);
  503. let thisTime = new Date().getTime();
  504. // 控制延迟逻辑
  505. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  506. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  507. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  508. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  509. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  510. thisClass.downTimeEvent();
  511. });
  512. });
  513. }
  514. break;
  515. // 踩下车辆离合器5秒
  516. case '踩下车辆离合器5秒':
  517. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  518. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  519. // 切换成正在处理中
  520. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  521. // 切换视角
  522. objIframeEdit.modelPeopleLook(3);
  523. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车踩离合5秒");
  524. objIframeEdit.roleShow(false);
  525. let thisTime = new Date().getTime();
  526. // 控制延迟逻辑
  527. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  528. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  529. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('踩下车辆离合器5秒', function() {
  530. WindowEvent.find().WindowCountdownOpen(5, "自定义返回数据", function(WindowCountdownOpenRes) {
  531. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  532. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  533. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  534. thisClass.downTimeEvent();
  535. });
  536. });
  537. });
  538. }
  539. break;
  540. // 按下取力器开关
  541. case '按下取力器开关':
  542. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  543. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  544. // 切换成正在处理中
  545. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  546. // 切换视角
  547. objIframeEdit.modelPeopleLook(3);
  548. // objIframeEdit.cameraVisualAngleGetListNameGpsTo("观察仪表盘指示目视");
  549. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车按下取力器开关");
  550. objIframeEdit.roleShow(false);
  551. let thisTime = new Date().getTime();
  552. // 控制延迟逻辑
  553. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  554. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  555. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  556. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  557. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  558. thisClass.downTimeEvent();
  559. });
  560. }
  561. break;
  562. // 缓慢抬起离合器
  563. case '缓慢抬起离合器':
  564. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  565. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  566. // 切换成正在处理中
  567. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  568. // 切换视角
  569. objIframeEdit.modelPeopleLook(3);
  570. // objIframeEdit.cameraVisualAngleGetListNameGpsTo("抬起离合器踏板2");
  571. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车缓慢抬起离合器");
  572. objIframeEdit.roleShow(false);
  573. let thisTime = new Date().getTime();
  574. // 控制延迟逻辑
  575. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  576. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  577. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('缓慢抬起离合器', function() {
  578. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  579. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  580. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  581. thisClass.downTimeEvent();
  582. });
  583. });
  584. }
  585. break;
  586. // 确定车辆双闪和工作箭头等是否正常
  587. case '确定车辆双闪和工作箭头等是否正常':
  588. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  589. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  590. // 切换成正在处理中
  591. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  592. // 切换视角
  593. objIframeEdit.modelPeopleLook(3);
  594. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车确定车辆双闪和工作箭头等是否正常");
  595. objIframeEdit.roleShow(false);
  596. let thisTime = new Date().getTime();
  597. // 控制延迟逻辑
  598. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  599. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  600. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  601. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  602. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  603. thisClass.downTimeEvent();
  604. });
  605. }
  606. break;
  607. // 下车
  608. case '下车':
  609. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  610. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  611. // 切换成正在处理中
  612. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  613. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_打开左门', function() {
  614. // 切换视角
  615. objIframeEdit.modelPeopleLook(3);
  616. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车下车_1");
  617. objIframeEdit.roleShow(false);
  618. let thisTime = new Date().getTime();
  619. // 控制延迟逻辑
  620. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500 * 2, function(fpsEventAddRet) {
  621. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  622. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_关门', function() {
  623. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  624. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  625. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  626. thisClass.downTimeEvent();
  627. });
  628. });
  629. });
  630. }
  631. break;
  632. // 下车确定安全灯显示是否正常
  633. case '下车确定安全灯显示是否正常':
  634. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  635. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  636. // 切换成正在处理中
  637. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  638. // QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_关门', function() {
  639. // 切换视角
  640. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  641. objIframeEdit.modelPeopleLook(3);
  642. // objIframeEdit.cameraVisualAngleGetListNameGpsTo("下车观察各项灯光");
  643. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车确定安全灯是否正常");
  644. objIframeEdit.roleShow(false);
  645. let thisTime = new Date().getTime();
  646. // 控制延迟逻辑
  647. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  648. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  649. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  650. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  651. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  652. thisClass.downTimeEvent();
  653. });
  654. // });
  655. }
  656. break;
  657. // 在施工范围放置警示标识
  658. case '在施工范围放置警示标识':
  659. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  660. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  661. // 切换成正在处理中
  662. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  663. // 切换视角
  664. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();// 先记录下当前视角
  665. objIframeEdit.modelPeopleLook(3);
  666. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车摆放安全桩");
  667. objIframeEdit.roleShow(false);
  668. let thisTime = new Date().getTime();
  669. // 控制延迟逻辑
  670. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  671. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  672. QingXiCheAndQvComClipPlaneMeshEvent.find().anQuanZhuangLookYes(function() {
  673. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  674. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  675. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  676. thisClass.downTimeEvent();
  677. });
  678. });
  679. }
  680. break;
  681. // 从水管固定座上拧下高压水管
  682. case '从水管固定座上拧下高压水管':
  683. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  684. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  685. // 切换成正在处理中
  686. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  687. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  688. // 切换视角
  689. objIframeEdit.modelPeopleLook(3);
  690. objIframeEdit.cameraVisualAngleGetListNameGpsTo("从水管固定座上拧下高压水管2");
  691. objIframeEdit.roleShow(false);
  692. let thisTime = new Date().getTime();
  693. // 控制延迟逻辑
  694. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  695. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  696. // QingXiCheAndQvComClipPlaneMeshEvent.find().jieKaiLookYes(function() {
  697. QingXiCheAndQvComClipPlaneMeshEvent.find().jieKaiLookYes_2(function() {
  698. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  699. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  700. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  701. thisClass.downTimeEvent();
  702. });
  703. });
  704. }
  705. break;
  706. // 调整卷筒器到合适位置
  707. case '调整卷筒器到合适位置':
  708. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  709. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  710. // 切换成正在处理中
  711. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  712. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  713. // 切换视角
  714. objIframeEdit.modelPeopleLook(3);
  715. objIframeEdit.cameraVisualAngleGetListNameGpsTo("调整卷筒器到合适位置2");
  716. objIframeEdit.roleShow(false);
  717. let thisTime = new Date().getTime();
  718. // 控制延迟逻辑
  719. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  720. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  721. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_打开_1', function() {
  722. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_打开_2', function() {
  723. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  724. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  725. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  726. thisClass.downTimeEvent();
  727. });
  728. });
  729. });
  730. }
  731. break;
  732. // 取出高压水管并放入布管器内
  733. case '取出高压水管并放入布管器内':
  734. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  735. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  736. // 切换成正在处理中
  737. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  738. // 切换视角
  739. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  740. objIframeEdit.modelPeopleLook(3);
  741. objIframeEdit.cameraVisualAngleGetListNameGpsTo("取出高压水管并放入布管器内2");
  742. objIframeEdit.roleShow(false);
  743. let thisTime = new Date().getTime();
  744. // 控制延迟逻辑
  745. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  746. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  747. QingXiCheAndQvComClipPlaneMeshEvent.find().zhuanDaoWeiLookYes(function() {
  748. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  749. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  750. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  751. thisClass.downTimeEvent();
  752. });
  753. });
  754. }
  755. break;
  756. // 套上高压水管护管器
  757. case '套上高压水管护管器':
  758. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  759. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  760. // 切换成正在处理中
  761. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  762. // 切换视角
  763. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  764. objIframeEdit.modelPeopleLook(3);
  765. objIframeEdit.cameraVisualAngleGetListNameGpsTo("套上高压水管护管器2");
  766. objIframeEdit.roleShow(false);
  767. let thisTime = new Date().getTime();
  768. // 控制延迟逻辑
  769. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  770. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  771. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_套上高压水管护管器', function() {
  772. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  773. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  774. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  775. thisClass.downTimeEvent();
  776. // QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_1(function() {
  777. // QingXiCheAndQvCarEvent.find().eventEnd = 2;
  778. // QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  779. // QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  780. // });
  781. });
  782. });
  783. }
  784. break;
  785. // 安装合适的高压喷头
  786. case '安装合适的高压喷头':
  787. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  788. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  789. // 切换成正在处理中
  790. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  791. // 切换视角
  792. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  793. objIframeEdit.modelPeopleLook(3);
  794. objIframeEdit.cameraVisualAngleGetListNameGpsTo("安装合适的高压喷头2");
  795. objIframeEdit.roleShow(false);
  796. let thisTime = new Date().getTime();
  797. // 控制延迟逻辑
  798. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  799. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  800. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_打开箱子', function() {
  801. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_喷头移动到对应位置', function() {
  802. QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_1(function() {
  803. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  804. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  805. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  806. thisClass.downTimeEvent();
  807. });
  808. });
  809. });
  810. });
  811. }
  812. break;
  813. // 将高压水管放入待施工的管道内
  814. case '将高压水管放入待施工的管道内':
  815. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  816. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  817. // 切换成正在处理中
  818. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  819. // 切换视角
  820. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  821. objIframeEdit.modelPeopleLook(3);
  822. objIframeEdit.cameraVisualAngleGetListNameGpsTo("将高压水管放入待施工的管道内2");
  823. objIframeEdit.roleShow(false);
  824. let thisTime = new Date().getTime();
  825. // 控制延迟逻辑
  826. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  827. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  828. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_将高压水管放入待施工的管道内_打开井盖', function() {
  829. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_高压水管护管器_弯曲', function() {
  830. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_喷头移动到对应位置_下井', function() {
  831. });
  832. QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_2(function() {
  833. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  834. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  835. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  836. thisClass.downTimeEvent();
  837. });
  838. });
  839. });
  840. });
  841. }
  842. break;
  843. // 在触屏操作面板上将管长清零
  844. case '在触屏操作面板上将管长清零':
  845. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  846. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  847. // 切换成正在处理中
  848. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  849. // 切换视角
  850. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  851. objIframeEdit.modelPeopleLook(3);
  852. objIframeEdit.cameraVisualAngleGetListNameGpsTo("在触屏操作面板上将管长清零2");
  853. objIframeEdit.roleShow(false);
  854. let thisTime = new Date().getTime();
  855. // 控制延迟逻辑
  856. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  857. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  858. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  859. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  860. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  861. thisClass.downTimeEvent();
  862. });
  863. }
  864. break;
  865. // 在安全的情况开启冲水开关
  866. case '在安全的情况开启冲水开关':
  867. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  868. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  869. // 切换成正在处理中
  870. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  871. // 切换视角
  872. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  873. objIframeEdit.modelPeopleLook(3);
  874. objIframeEdit.cameraVisualAngleGetListNameGpsTo("在安全的情况开启冲水开关2");
  875. objIframeEdit.roleShow(false);
  876. let thisTime = new Date().getTime();
  877. // 控制延迟逻辑
  878. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  879. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  880. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  881. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  882. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  883. thisClass.downTimeEvent();
  884. });
  885. }
  886. break;
  887. // 根据现场工况调节冲水压力
  888. case '根据现场工况调节冲水压力':
  889. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  890. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  891. // 切换成正在处理中
  892. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  893. // 切换视角
  894. objIframeEdit.modelPeopleLook(3);
  895. objIframeEdit.cameraVisualAngleGetListNameGpsTo("根据现场工况调节冲水压力2");
  896. objIframeEdit.roleShow(false);
  897. let thisTime = new Date().getTime();
  898. // 控制延迟逻辑
  899. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  900. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  901. QingXiCheAdnQvCarEventStep.find().waterEvent(true);
  902. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  903. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  904. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  905. thisClass.downTimeEvent();
  906. });
  907. }
  908. break;
  909. // 疏通管道后减小油门到初始状态
  910. case '疏通管道后减小油门到初始状态':
  911. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  912. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  913. // 切换成正在处理中
  914. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  915. // 切换视角
  916. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  917. objIframeEdit.modelPeopleLook(3);
  918. objIframeEdit.cameraVisualAngleGetListNameGpsTo("疏通管道后减小油门到初始状态2");
  919. objIframeEdit.roleShow(false);
  920. let thisTime = new Date().getTime();
  921. // 控制延迟逻辑
  922. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  923. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  924. QingXiCheAdnQvCarEventStep.find().waterEvent(false);
  925. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  926. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  927. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  928. thisClass.downTimeEvent();
  929. });
  930. }
  931. break;
  932. // 带压收回高压水管
  933. case '带压收回高压水管':
  934. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  935. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  936. // 切换成正在处理中
  937. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  938. // 切换视角
  939. objIframeEdit.modelPeopleLook(3);
  940. objIframeEdit.cameraVisualAngleGetListNameGpsTo("带压收回高压水管2");
  941. objIframeEdit.roleShow(false);
  942. let thisTime = new Date().getTime();
  943. // 控制延迟逻辑
  944. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  945. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  946. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  947. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  948. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  949. });
  950. }
  951. break;
  952. // 至触摸屏关闭冲水开关
  953. case '至触摸屏关闭冲水开关':
  954. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  955. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  956. // 切换成正在处理中
  957. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  958. // 切换视角
  959. objIframeEdit.modelPeopleLook(3);
  960. objIframeEdit.cameraVisualAngleGetListNameGpsTo("至触摸屏关闭冲水开关2");
  961. objIframeEdit.roleShow(false);
  962. let thisTime = new Date().getTime();
  963. // 控制延迟逻辑
  964. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  965. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  966. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  967. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  968. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  969. });
  970. }
  971. break;
  972. // 缓慢收回高压水管
  973. case '缓慢收回高压水管':
  974. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  975. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  976. // 切换成正在处理中
  977. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  978. // 切换视角
  979. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  980. objIframeEdit.modelPeopleLook(3);
  981. objIframeEdit.cameraVisualAngleGetListNameGpsTo("缓慢收回高压水管2");
  982. objIframeEdit.roleShow(false);
  983. let thisTime = new Date().getTime();
  984. // 控制延迟逻辑
  985. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  986. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  987. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_高压水管护管器_变直', function() {
  988. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_将高压水管放入待施工的管道内_关闭井盖', function() {
  989. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_喷头移动到对应位置_地面', function() {
  990. });
  991. QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_3(function() {
  992. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  993. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  994. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  995. thisClass.downTimeEvent();
  996. });
  997. });
  998. });
  999. });
  1000. }
  1001. break;
  1002. // 拆卸高压喷头放入喷头机箱内
  1003. case '拆卸高压喷头放入喷头机箱内':
  1004. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1005. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1006. // 切换成正在处理中
  1007. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1008. // 切换视角
  1009. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1010. objIframeEdit.modelPeopleLook(3);
  1011. objIframeEdit.cameraVisualAngleGetListNameGpsTo("拆卸高压喷头放入喷头机箱内2");
  1012. objIframeEdit.roleShow(false);
  1013. let thisTime = new Date().getTime();
  1014. // 控制延迟逻辑
  1015. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1016. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1017. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_喷头放入箱内', function() {
  1018. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_箱子盖起', function() {
  1019. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1020. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1021. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1022. thisClass.downTimeEvent();
  1023. });
  1024. });
  1025. });
  1026. }
  1027. break;
  1028. // 收起高压水管将卷筒恢复到初始状态
  1029. case '收起高压水管将卷筒恢复到初始状态':
  1030. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1031. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1032. // 切换成正在处理中
  1033. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1034. // 切换视角
  1035. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1036. objIframeEdit.modelPeopleLook(3);
  1037. // objIframeEdit.cameraVisualAngleGetListNameGpsTo("收起高压水管将卷筒恢复到初始状态2");
  1038. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车收回高压水管并拆卸高压喷头放入喷头机箱内1");
  1039. objIframeEdit.roleShow(false);
  1040. let thisTime = new Date().getTime();
  1041. // 控制延迟逻辑
  1042. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1043. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1044. QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_4(function() {
  1045. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_高压水管护管器回到原始位置', function() {
  1046. objIframeEdit.cameraVisualAngleGetListNameGpsTo("收起高压水管将卷筒恢复到初始状态2");
  1047. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1048. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1049. QingXiCheAndQvComClipPlaneMeshEvent.find().zhuanDaoWeiLookYes_2(function() {
  1050. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_关闭_2', function() {
  1051. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_关闭_1', function() {
  1052. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1053. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1054. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1055. thisClass.downTimeEvent();
  1056. });
  1057. });
  1058. });
  1059. });
  1060. });
  1061. });
  1062. });
  1063. }
  1064. break;
  1065. // 将高压水管拧到水管固定座
  1066. case '将高压水管拧到水管固定座':
  1067. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1068. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1069. // 切换成正在处理中
  1070. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1071. // 切换视角
  1072. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1073. objIframeEdit.modelPeopleLook(3);
  1074. objIframeEdit.cameraVisualAngleGetListNameGpsTo("将高压水管拧到水管固定座2");
  1075. objIframeEdit.roleShow(false);
  1076. let thisTime = new Date().getTime();
  1077. // 控制延迟逻辑
  1078. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1079. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1080. QingXiCheAndQvComClipPlaneMeshEvent.find().jieKaiLookYes(function() {
  1081. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1082. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1083. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1084. thisClass.downTimeEvent();
  1085. });
  1086. });
  1087. }
  1088. break;
  1089. // 小卷筒使用方法_开启卷帘门
  1090. case '小卷筒使用方法_开启卷帘门':
  1091. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1092. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1093. // 切换成正在处理中
  1094. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1095. // 切换视角
  1096. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1097. objIframeEdit.modelPeopleLook(3);
  1098. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车拉出水管到需要的长度固定2");
  1099. objIframeEdit.roleShow(false);
  1100. let thisTime = new Date().getTime();
  1101. // 控制延迟逻辑
  1102. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1103. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1104. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('小卷筒使用方法_开启卷帘门', function() {
  1105. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1106. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1107. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1108. thisClass.downTimeEvent();
  1109. });
  1110. });
  1111. }
  1112. break;
  1113. // 小卷筒使用方法_开启车身侧门
  1114. case '小卷筒使用方法_开启车身侧门':
  1115. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1116. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1117. // 切换成正在处理中
  1118. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1119. // 切换视角
  1120. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1121. objIframeEdit.modelPeopleLook(3);
  1122. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车拉出水管到需要的长度固定1");
  1123. objIframeEdit.roleShow(false);
  1124. let thisTime = new Date().getTime();
  1125. // 控制延迟逻辑
  1126. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1127. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1128. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('小卷筒使用方法_开启车身侧门', function() {
  1129. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1130. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1131. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1132. thisClass.downTimeEvent();
  1133. });
  1134. });
  1135. }
  1136. break;
  1137. // 小卷筒使用方法_拉出水管到需要的长度固定
  1138. case '小卷筒使用方法_拉出水管到需要的长度固定':
  1139. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1140. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1141. // 切换成正在处理中
  1142. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1143. // 切换视角
  1144. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1145. objIframeEdit.modelPeopleLook(3);
  1146. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车拉出水管到需要的长度固定2");
  1147. objIframeEdit.roleShow(false);
  1148. let thisTime = new Date().getTime();
  1149. // 控制延迟逻辑
  1150. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1151. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1152. QingXiCheAndQvComClipPlaneMeshEvent.find().shuiQiangGuanLook_1(function() {
  1153. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1154. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1155. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1156. thisClass.downTimeEvent();
  1157. });
  1158. });
  1159. }
  1160. break;
  1161. // 小卷筒使用方法_安装手持水枪
  1162. case '小卷筒使用方法_安装手持水枪':
  1163. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1164. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1165. // 切换成正在处理中
  1166. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1167. // 切换视角
  1168. objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
  1169. objIframeEdit.modelPeopleLook(3);
  1170. objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车拉出水管到需要的长度固定2");
  1171. objIframeEdit.roleShow(false);
  1172. let thisTime = new Date().getTime();
  1173. // 控制延迟逻辑
  1174. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1175. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1176. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('小卷筒使用方法_安装手持水枪', function() {
  1177. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1178. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1179. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1180. thisClass.downTimeEvent();
  1181. });
  1182. });
  1183. }
  1184. break;
  1185. // 回到驾驶室踩下车辆离合器5秒
  1186. case '回到驾驶室踩下车辆离合器5秒':
  1187. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1188. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1189. // 切换成正在处理中
  1190. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1191. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('踩下车辆离合器5秒', function() {
  1192. WindowEvent.find().WindowCountdownOpen(5, "自定义返回数据", function(WindowCountdownOpenRes) {
  1193. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1194. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1195. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1196. });
  1197. });
  1198. }
  1199. break;
  1200. // 关闭取力器开关
  1201. case '关闭取力器开关':
  1202. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1203. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1204. // 切换成正在处理中
  1205. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1206. // 切换视角
  1207. objIframeEdit.modelPeopleLook(3);
  1208. objIframeEdit.cameraVisualAngleGetListNameGpsTo("观察仪表盘指示目视");
  1209. objIframeEdit.roleShow(false);
  1210. let thisTime = new Date().getTime();
  1211. // 控制延迟逻辑
  1212. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1213. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1214. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1215. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1216. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1217. });
  1218. }
  1219. break;
  1220. // 关闭车辆双闪和工作双闪箭头灯
  1221. case '关闭车辆双闪和工作双闪箭头灯':
  1222. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1223. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1224. // 切换成正在处理中
  1225. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1226. QingXiCheAndQvCarEvent.find().carShuangShanOpen(false);
  1227. // 切换视角
  1228. objIframeEdit.modelPeopleLook(3);
  1229. objIframeEdit.cameraVisualAngleGetListNameGpsTo("打开工作双闪箭头灯");
  1230. objIframeEdit.roleShow(false);
  1231. let thisTime = new Date().getTime();
  1232. // 控制延迟逻辑
  1233. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1234. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1235. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1236. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1237. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1238. });
  1239. }
  1240. break;
  1241. // 车辆正常熄火
  1242. case '车辆正常熄火':
  1243. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1244. QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
  1245. // 切换成正在处理中
  1246. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1247. // 切换视角
  1248. objIframeEdit.modelPeopleLook(3);
  1249. objIframeEdit.cameraVisualAngleGetListNameGpsTo("拧动钥匙发动车辆");
  1250. objIframeEdit.roleShow(false);
  1251. let thisTime = new Date().getTime();
  1252. // 控制延迟逻辑
  1253. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1254. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1255. QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_钥匙关闭_熄火', function() {
  1256. QingXiCheAndQvCarEvent.find().carOpen(false);
  1257. // 切换视角
  1258. objIframeEdit.modelPeopleLook(3);
  1259. objIframeEdit.cameraVisualAngleGetListNameGpsTo("拧动钥匙发动车辆向上");
  1260. objIframeEdit.roleShow(false);
  1261. thisTime = new Date().getTime();
  1262. // 控制延迟逻辑
  1263. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1264. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1265. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1266. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1267. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1268. });
  1269. });
  1270. });
  1271. }
  1272. break;
  1273. // //
  1274. // case '':
  1275. // break;
  1276. // //
  1277. // case '':
  1278. // break;
  1279. // 已完成所有任务
  1280. case 'equipmentRepositioningWork':
  1281. break;
  1282. // 数字修复虚拟仿真-将阀门关闭停止水流
  1283. case '数字修复虚拟仿真-将阀门关闭停止水流':
  1284. if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
  1285. // 切换成正在处理中
  1286. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1287. // 切换视角
  1288. objIframeEdit.modelPeopleLook(3);
  1289. objIframeEdit.cameraVisualAngleGetListNameGpsTo("关闭阀门完成");
  1290. objIframeEdit.roleShow(false);
  1291. let thisTime = new Date().getTime();
  1292. // 控制延迟逻辑
  1293. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1294. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1295. // 停止水流
  1296. QingXiCheAdnQvCarEventStep.find().waterGuanEvent(false);
  1297. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1298. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1299. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1300. });
  1301. }
  1302. break;
  1303. // 数字修复虚拟仿真-将橡胶垫片放置到正确的位置
  1304. case '数字修复虚拟仿真-将橡胶垫片放置到正确的位置':
  1305. // 切换成正在处理中
  1306. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1307. // 范围内
  1308. if (dragBool == true) {
  1309. // 回到原始位置
  1310. thisClass.moveMeshListResetPosition();
  1311. WindowEvent.find().WindowTxtViewOpenEvent(
  1312. // "现在播放橡胶垫片安装过程\n"
  1313. // +
  1314. "各类机械设备的法兰连接、轴承密封、泵体密封等部位都需要使用橡胶垫片,以保证设备的正常运行,防止润滑油、液压油等泄漏"
  1315. );
  1316. // WindowEvent.find().WindowVideoViewOpenEvent(
  1317. // QingXiCheAndQvCarEvent.find().videoJson["02"],
  1318. // { "自定义回调的字段" : "自定义回调的字段111" },
  1319. // function(WindowVideoViewOpenEventRes) {
  1320. // console.log(
  1321. // "WindowVideoViewOpenEventRes", WindowVideoViewOpenEventRes
  1322. // );
  1323. // }
  1324. // );
  1325. // 切换视角
  1326. objIframeEdit.modelPeopleLook(3);
  1327. objIframeEdit.cameraVisualAngleGetListNameGpsTo("将橡胶垫片放置到正确的位置_完成");
  1328. objIframeEdit.roleShow(false);
  1329. let thisTime = new Date().getTime();
  1330. // 控制延迟逻辑
  1331. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1332. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1333. thisClass.xiangJiaoDianPianOk(function() {
  1334. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1335. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1336. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1337. });
  1338. });
  1339. } else {
  1340. // 回到原始位置
  1341. thisClass.moveMeshListResetPosition();
  1342. // 范围外
  1343. QingXiCheAndQvCarEvent.find().eventEnd = 0;
  1344. }
  1345. break;
  1346. // 数字修复虚拟仿真-将抱箍放置到正确的位置
  1347. case '数字修复虚拟仿真-将抱箍放置到正确的位置':
  1348. // 切换成正在处理中
  1349. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1350. // 范围内
  1351. if (dragBool == true) {
  1352. // 回到原始位置
  1353. thisClass.moveMeshListResetPosition();
  1354. WindowEvent.find().WindowTxtViewOpenEvent(
  1355. // "现在播放橡抱箍安装过程\n"
  1356. // +
  1357. "抱箍是一种用于抱住或箍住其他材料的紧固件,通过将两个或多个部件紧紧固定在一起,起到连接、支撑或加固的作用."
  1358. + "通常由箍板、翼板、拉结筋板、螺栓及内衬垫构成。其中,箍板是主要的抱紧部件,翼板用于增加连接面积或提供额外的支撑点,拉结筋板则增强箍板的强度和稳定性,螺栓用于将抱箍紧固,内衬垫则可增加摩擦力或保护被箍物体的表面"
  1359. );
  1360. // 切换视角
  1361. objIframeEdit.modelPeopleLook(3);
  1362. objIframeEdit.cameraVisualAngleGetListNameGpsTo("将抱箍放置到正确的位置_完成");
  1363. objIframeEdit.roleShow(false);
  1364. let thisTime = new Date().getTime();
  1365. // 控制延迟逻辑
  1366. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1367. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1368. thisClass.baoGuOk(function() {
  1369. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1370. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1371. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1372. });
  1373. });
  1374. } else {
  1375. // 回到原始位置
  1376. thisClass.moveMeshListResetPosition();
  1377. // 范围外
  1378. QingXiCheAndQvCarEvent.find().eventEnd = 0;
  1379. }
  1380. break;
  1381. // 数字修复虚拟仿真-将插销安装到正确的位置
  1382. case '数字修复虚拟仿真-将插销安装到正确的位置':
  1383. // 切换成正在处理中
  1384. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1385. // 范围内
  1386. if (dragBool == true) {
  1387. // 回到原始位置
  1388. thisClass.moveMeshListResetPosition();
  1389. WindowEvent.find().WindowTxtViewOpenEvent(
  1390. // "现在播放插销安装过程\n"
  1391. // +
  1392. "通过将销杆插入对应的销孔中,实现物体之间的连接或锁定。利用销杆与销孔之间的配合精度和摩擦力,保持连接的稳定性。带有锁止机构的插销,通过特定的操作(如旋转、按压等)使锁止部件卡住销杆,防止其意外拔出,增强锁定效果。"
  1393. );
  1394. // 切换视角
  1395. objIframeEdit.modelPeopleLook(3);
  1396. objIframeEdit.cameraVisualAngleGetListNameGpsTo("将插销安装到正确的位置_完成");
  1397. objIframeEdit.roleShow(false);
  1398. let thisTime = new Date().getTime();
  1399. // 控制延迟逻辑
  1400. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1401. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1402. thisClass.chaXiaoOk(function() {
  1403. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1404. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1405. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1406. });
  1407. });
  1408. } else {
  1409. // 回到原始位置
  1410. thisClass.moveMeshListResetPosition();
  1411. // 范围外
  1412. QingXiCheAndQvCarEvent.find().eventEnd = 0;
  1413. }
  1414. break;
  1415. // 数字修复虚拟仿真-将螺丝安装到正确的位置
  1416. case '数字修复虚拟仿真-将螺丝安装到正确的位置':
  1417. // 切换成正在处理中
  1418. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1419. // 范围内
  1420. if (dragBool == true) {
  1421. // 回到原始位置
  1422. thisClass.moveMeshListResetPosition();
  1423. WindowEvent.find().WindowTxtViewOpenEvent(
  1424. // "现在播放螺丝安装过程\n"
  1425. // +
  1426. "螺丝通常由头部和螺纹杆两部分组成。头部有不同的形状,如圆形、方形、六角形等,以便使用相应的工具进行拧紧或松开操作。螺纹杆上有螺旋状的螺纹,用于与螺母或带有内螺纹的部件配合。"
  1427. );
  1428. // 切换视角
  1429. objIframeEdit.modelPeopleLook(3);
  1430. objIframeEdit.cameraVisualAngleGetListNameGpsTo("将螺丝安装到正确的位置_完成");
  1431. objIframeEdit.roleShow(false);
  1432. let thisTime = new Date().getTime();
  1433. // 控制延迟逻辑
  1434. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1435. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1436. thisClass.luoSiOk(function() {
  1437. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1438. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1439. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1440. });
  1441. });
  1442. } else {
  1443. // 回到原始位置
  1444. thisClass.moveMeshListResetPosition();
  1445. // 范围外
  1446. QingXiCheAndQvCarEvent.find().eventEnd = 0;
  1447. }
  1448. break;
  1449. // 数字修复虚拟仿真-用扳手将螺丝旋紧螺丝
  1450. case '数字修复虚拟仿真-用扳手将螺丝旋紧螺丝':
  1451. // 切换成正在处理中
  1452. QingXiCheAndQvCarEvent.find().eventEnd = 1;
  1453. // 范围内
  1454. if (dragBool == true) {
  1455. // 回到原始位置
  1456. thisClass.moveMeshListResetPosition();
  1457. WindowEvent.find().WindowTxtViewOpenEvent(
  1458. // "现在播放扳手使用过程\n"
  1459. // +
  1460. "扳手通常由头部和手柄两部分组成。头部是与螺栓或螺母接触并施加扭矩的部分,根据不同的类型有各种形状和结构;手柄则用于握持和施加力,一般为杆状,以提供足够的杠杆作用。"
  1461. );
  1462. // 切换视角
  1463. objIframeEdit.modelPeopleLook(3);
  1464. objIframeEdit.cameraVisualAngleGetListNameGpsTo("用扳手将螺丝旋紧螺丝_完成");
  1465. objIframeEdit.roleShow(false);
  1466. let thisTime = new Date().getTime();
  1467. // 控制延迟逻辑
  1468. ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
  1469. ComVal.find().fpsEventDel(fpsEventAddRet.code);
  1470. thisClass.banShouOk(function() {
  1471. QingXiCheAndQvCarEvent.find().eventEnd = 2;
  1472. QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
  1473. QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
  1474. });
  1475. });
  1476. } else {
  1477. // 回到原始位置
  1478. thisClass.moveMeshListResetPosition();
  1479. // 范围外
  1480. QingXiCheAndQvCarEvent.find().eventEnd = 0;
  1481. }
  1482. break;
  1483. // //
  1484. // case '':
  1485. // break;
  1486. // //
  1487. // case '':
  1488. // break;
  1489. default:
  1490. break;
  1491. }
  1492. // 上面执行完成,固定执行如下逻辑
  1493. thisClass.moveMeshListReset();
  1494. }
  1495. /**
  1496. * 根据不同类型,触发对应物体列表高亮逻辑
  1497. * type 对应类型操作高亮
  1498. */
  1499. meshListComHighlightEvent = (type) => {
  1500. let thisClass = this;
  1501. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1502. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1503. let objIframe = objThreeWorldEventMain.objIframe;
  1504. let objScene = objThreeWorldEventMain.objScene;
  1505. let BABYLON = objThreeWorldEventMain.BABYLON;
  1506. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1507. let meshList = [];
  1508. // QingXiCheAndQvComHighlightLayer.find().delAll("自定义");
  1509. // 默认不闪烁
  1510. QingXiCheAndQvComHighlightLayer.find().flickerBool = false;
  1511. switch (type) {
  1512. case "数字修复虚拟仿真-将阀门关闭停止水流":
  1513. meshList = [
  1514. "model_1746598895146阀门_primitive0",
  1515. "model_1746598895146阀门_primitive1",
  1516. ];
  1517. // 开启闪烁逻辑
  1518. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1519. break;
  1520. case "数字修复虚拟仿真-将橡胶垫片放置到正确的位置":
  1521. meshList = [
  1522. "model_1746598895146橡胶垫",
  1523. ];
  1524. // 开启闪烁逻辑
  1525. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1526. break;
  1527. case "数字修复虚拟仿真-将抱箍放置到正确的位置":
  1528. meshList = [
  1529. "model_1746598895146上箍",
  1530. "model_1746598895146插销轴",
  1531. "model_1746598895146下箍",
  1532. ];
  1533. // 开启闪烁逻辑
  1534. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1535. break;
  1536. case "数字修复虚拟仿真-将插销安装到正确的位置":
  1537. meshList = [
  1538. "model_1746598895146插销1",
  1539. "model_1746598895146插销2",
  1540. ];
  1541. // 开启闪烁逻辑
  1542. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1543. break;
  1544. case "数字修复虚拟仿真-将螺丝安装到正确的位置":
  1545. meshList = [
  1546. "model_1746598895146紧箍螺丝01",
  1547. "model_1746598895146紧箍螺丝02",
  1548. "model_1746598895146紧箍螺丝03",
  1549. ];
  1550. // 开启闪烁逻辑
  1551. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1552. break;
  1553. case "数字修复虚拟仿真-用扳手将螺丝旋紧螺丝":
  1554. meshList = [
  1555. "model_1746598895146扳手",
  1556. ];
  1557. // 开启闪烁逻辑
  1558. QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
  1559. break;
  1560. case "":
  1561. break;
  1562. }
  1563. for (let i = 0; i < meshList.length; i++) {
  1564. let meshId = meshList[i];
  1565. let objMesh = objScene.getMeshById(meshId);
  1566. if (objMesh != null && objMesh != undefined) {
  1567. // console.log(
  1568. // "添加发光的物体", meshId, objMesh
  1569. // );
  1570. // 先去除
  1571. QingXiCheAndQvComHighlightLayer.find().delMesh("自定义", objMesh);
  1572. // 在添加
  1573. QingXiCheAndQvComHighlightLayer.find().addMesh("自定义", objMesh, "rgb(79, 185, 255)");
  1574. }
  1575. }
  1576. }
  1577. /**
  1578. * 配置被拖拽物体的列表
  1579. * type 类型,根据不同类型进行获取
  1580. */
  1581. meshMoveConfig = function(type) {
  1582. let meshList = [];
  1583. switch(type) {
  1584. case "数字修复虚拟仿真-将橡胶垫片放置到正确的位置":
  1585. meshList = [
  1586. "model_1746598895146橡胶垫",
  1587. ];
  1588. break;
  1589. case "数字修复虚拟仿真-将抱箍放置到正确的位置":
  1590. meshList = [
  1591. "model_1746598895146上箍",
  1592. "model_1746598895146插销轴",
  1593. "model_1746598895146下箍",
  1594. ];
  1595. break;
  1596. case "数字修复虚拟仿真-将插销安装到正确的位置":
  1597. meshList = [
  1598. "model_1746598895146插销1",
  1599. "model_1746598895146插销2",
  1600. ];
  1601. break;
  1602. case "数字修复虚拟仿真-将螺丝安装到正确的位置":
  1603. meshList = [
  1604. "model_1746598895146紧箍螺丝01",
  1605. "model_1746598895146紧箍螺丝02",
  1606. "model_1746598895146紧箍螺丝03",
  1607. ];
  1608. break;
  1609. case "数字修复虚拟仿真-用扳手将螺丝旋紧螺丝":
  1610. meshList = [
  1611. "model_1746598895146扳手",
  1612. ];
  1613. break;
  1614. case "":
  1615. break;
  1616. }
  1617. if (meshList.length <= 0) {
  1618. return null;
  1619. }
  1620. let meshJson = {};
  1621. for (let i = 0; i < meshList.length; i++) {
  1622. let meshId = meshList[i];
  1623. meshJson[meshId] = meshId;
  1624. }
  1625. return {
  1626. "meshList" : meshList,
  1627. "meshJson" : meshJson,
  1628. };
  1629. }
  1630. /**
  1631. * 数字修复虚拟仿真-将橡胶垫片放置到正确的位置
  1632. * callback 开启完成回调
  1633. */
  1634. xiangJiaoDianPianOk = (callback) => {
  1635. let thisClass = this;
  1636. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1637. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1638. let objIframe = objThreeWorldEventMain.objIframe;
  1639. let objScene = objThreeWorldEventMain.objScene;
  1640. let BABYLON = objThreeWorldEventMain.BABYLON;
  1641. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1642. // 播放动画列表
  1643. let playList = [
  1644. { "name" : "橡胶垫.001", "speed" : 2, "from" : 0, "to" : 200 },
  1645. ];
  1646. // 动画播放完成次数
  1647. let playEndNum = 0;
  1648. for (let i = 0; i < playList.length; i++) {
  1649. let thisPlayList = playList[i];
  1650. ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
  1651. thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
  1652. function(state, objAnimation) {
  1653. if (state == "播放完成") {
  1654. playEndNum += 1;
  1655. if (playEndNum >= playList.length) {
  1656. callback("yes");
  1657. }
  1658. }
  1659. }
  1660. );
  1661. }
  1662. }
  1663. /**
  1664. * 数字修复虚拟仿真-将抱箍放置到正确的位置
  1665. * callback 开启完成回调
  1666. */
  1667. baoGuOk = (callback) => {
  1668. let thisClass = this;
  1669. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1670. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1671. let objIframe = objThreeWorldEventMain.objIframe;
  1672. let objScene = objThreeWorldEventMain.objScene;
  1673. let BABYLON = objThreeWorldEventMain.BABYLON;
  1674. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1675. // 播放动画列表
  1676. let playList = [
  1677. { "name" : "上箍", "speed" : 2, "from" : 0, "to" : 300 },
  1678. { "name" : "插销轴.001", "speed" : 2, "from" : 0, "to" : 200 },
  1679. { "name" : "下箍.001", "speed" : 2, "from" : 0, "to" : 300 },
  1680. ];
  1681. // 动画播放完成次数
  1682. let playEndNum = 0;
  1683. for (let i = 0; i < playList.length; i++) {
  1684. let thisPlayList = playList[i];
  1685. ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
  1686. thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
  1687. function(state, objAnimation) {
  1688. if (state == "播放完成") {
  1689. playEndNum += 1;
  1690. if (playEndNum >= playList.length) {
  1691. callback("yes");
  1692. }
  1693. }
  1694. }
  1695. );
  1696. }
  1697. }
  1698. /**
  1699. * 数字修复虚拟仿真-将插销安装到正确的位置
  1700. * callback 开启完成回调
  1701. */
  1702. chaXiaoOk = function(callback) {
  1703. let thisClass = this;
  1704. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1705. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1706. let objIframe = objThreeWorldEventMain.objIframe;
  1707. let objScene = objThreeWorldEventMain.objScene;
  1708. let BABYLON = objThreeWorldEventMain.BABYLON;
  1709. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1710. // 播放动画列表
  1711. let playList = [
  1712. { "name" : "插销1.001", "speed" : 2, "from" : 300, "to" : 400 },
  1713. { "name" : "插销2.001", "speed" : 2, "from" : 300, "to" : 400 },
  1714. ];
  1715. // 动画播放完成次数
  1716. let playEndNum = 0;
  1717. for (let i = 0; i < playList.length; i++) {
  1718. let thisPlayList = playList[i];
  1719. ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
  1720. thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
  1721. function(state, objAnimation) {
  1722. if (state == "播放完成") {
  1723. playEndNum += 1;
  1724. if (playEndNum >= playList.length) {
  1725. callback("yes");
  1726. }
  1727. }
  1728. }
  1729. );
  1730. }
  1731. }
  1732. /**
  1733. * 数字修复虚拟仿真-将螺丝安装到正确的位置
  1734. * callback 开启完成回调
  1735. */
  1736. luoSiOk = function(callback) {
  1737. let thisClass = this;
  1738. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1739. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1740. let objIframe = objThreeWorldEventMain.objIframe;
  1741. let objScene = objThreeWorldEventMain.objScene;
  1742. let BABYLON = objThreeWorldEventMain.BABYLON;
  1743. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1744. // 播放动画列表
  1745. let playList = [
  1746. { "name" : "紧箍螺丝01.001", "speed" : 2, "from" : 400, "to" : 502 },
  1747. { "name" : "紧箍螺丝02.001", "speed" : 2, "from" : 400, "to" : 502 },
  1748. { "name" : "紧箍螺丝03|", "speed" : 2, "from" : 400, "to" : 502 },
  1749. ];
  1750. // 动画播放完成次数
  1751. let playEndNum = 0;
  1752. for (let i = 0; i < playList.length; i++) {
  1753. let thisPlayList = playList[i];
  1754. ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
  1755. thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
  1756. function(state, objAnimation) {
  1757. if (state == "播放完成") {
  1758. playEndNum += 1;
  1759. if (playEndNum >= playList.length) {
  1760. callback("yes");
  1761. }
  1762. }
  1763. }
  1764. );
  1765. }
  1766. }
  1767. /**
  1768. * 数字修复虚拟仿真-用扳手将螺丝旋紧螺丝
  1769. * callback 开启完成回调
  1770. */
  1771. banShouOk = function(callback) {
  1772. let thisClass = this;
  1773. let objThreeWorldEventMain = this.objThreeWorldEventMain;
  1774. let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
  1775. let objIframe = objThreeWorldEventMain.objIframe;
  1776. let objScene = objThreeWorldEventMain.objScene;
  1777. let BABYLON = objThreeWorldEventMain.BABYLON;
  1778. let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
  1779. // 播放动画列表
  1780. let playList = [
  1781. { "name" : "扳手.001", "speed" : 2, "from" : 500, "to" : 802 },
  1782. ];
  1783. // 动画播放完成次数
  1784. let playEndNum = 0;
  1785. for (let i = 0; i < playList.length; i++) {
  1786. let thisPlayList = playList[i];
  1787. ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
  1788. thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
  1789. function(state, objAnimation) {
  1790. if (state == "播放完成") {
  1791. playEndNum += 1;
  1792. if (playEndNum >= playList.length) {
  1793. callback("yes");
  1794. }
  1795. }
  1796. }
  1797. );
  1798. }
  1799. }
  1800. }