QingXiCheAndQvCarEventClick.js 106 KB

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