123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502 |
- import { QingXiCheAndQvCarEvent } from "./QingXiCheAndQvCarEvent.js";
- import { QingXiCheAndQvComHighlightLayer } from "./QingXiCheAndQvComHighlightLayer.js";
- import { ComVal } from "../common/ComVal.js";
- import { WindowEvent } from "../../WindowQingXiCheAndQv/js/WindowEvent.js";
- import { QingXiCheAndQvComRes } from '../js/QingXiCheAndQvComRes.js';
- import { QingXiCheAndQvComClipPlaneMeshEvent } from './QingXiCheAndQvComClipPlaneMeshEvent.js';
- import { QingXiCheAdnQvCarEventStep } from './QingXiCheAdnQvCarEventStep.js';
- import { ElMessage, ElMessageBox } from 'element-plus';
- /**
- * 操作清洗车仿真 点击物体的时候触发 逻辑
- */
- export class QingXiCheAndQvCarEventClick {
-
- // 每次 new 出对象则会调用这个构造函数
- constructor() {
- /**
- * 三维世界对象 src\components\ThreeWorldEvent\js\QingXiCheAndQvThreeWorldEventMain.js
- */
- this.objThreeWorldEventMain = null;
- /**
- * 当前移动的物体列表,和对应的参数
- * 当数组存在目标的时候,则 拖拽的时候,目标物体跟着鼠标移动
- */
- this.moveMeshList = [];
- // 记录第一次点击拖拽时候的坐标
- this.moveMeshListClick = {
- "x" : 0, "y" : 0, "z" : 0
- };
- /**
- * 当前这些参数不等于null的时候,则说明再拖拽移动目标物体
- * 此时固定相机的坐标,和视角
- */
- this.moveCameraRadius = null;
- this.moveCameraAlpha = null;
- this.moveCameraBeta = null;
- // 记录最后因为 this.moveMeshList 逻辑,鼠标移动的坐标
- this.moveCoordinate = {
- "x" : 0, "y" : 0, "z" : 0
- };
- // 是否开启每帧判断的逻辑
- this.renderEventBool = false;
- // 记录 QingXiCheAndQvProcessEventStore
- this.QingXiCheAndQvProcessEventStore = null;
- }
- // 实现单例模式
- static find() {
- if (!QingXiCheAndQvCarEventClick.instance) {
- QingXiCheAndQvCarEventClick.instance = new QingXiCheAndQvCarEventClick();
- }
- return QingXiCheAndQvCarEventClick.instance;
- }
- /**
- * 鼠标点击的时候
- * pickResult 点击的具体坐标,物体等信息
- */
- clickMeshEvent = function(pickResult) {
- let thisClass = this;
- let objThreeWorldEventMain = this.objThreeWorldEventMain;
- let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
- let objIframe = objThreeWorldEventMain.objIframe;
- let objScene = objThreeWorldEventMain.objScene;
- let BABYLON = objThreeWorldEventMain.BABYLON;
- let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
-
- // console.log(
- // "鼠标点击的时候", pickResult
- // );
- // 处理中则不做处理
- if (QingXiCheAndQvCarEvent.find().eventEnd != 0) {
- return this;
- }
- let type = QingXiCheAndQvCarEvent.find().eventName;
- let meshMoveConfig = thisClass.meshMoveConfig(type);
- if (meshMoveConfig == null) {
- thisClass.moveMeshListReset();
- return;
- }
- // 目标物体
- let pickedMesh = pickResult["pickedMesh"];
- if (typeof pickedMesh["id"] != "string") {
- return;
- }
- let meshId = pickedMesh["id"];
- // 点击的坐标
- let pickedPoint = pickResult["pickedPoint"];
-
- let meshList = meshMoveConfig["meshList"];
- let meshJson = meshMoveConfig["meshJson"];
- // 点击的不是在物体的列表里的时候
- if (meshJson[meshId] == null || meshJson[meshId] == undefined) {
- thisClass.moveMeshListReset();
- return;
- }
-
- let objSceneActiveCamera = ChengGuangYuanJing.CommonVal.find().objSceneActiveCamera;
- thisClass.moveCameraRadius = objSceneActiveCamera.radius;
- thisClass.moveCameraAlpha = objSceneActiveCamera.alpha;
- thisClass.moveCameraBeta = objSceneActiveCamera.beta;
- thisClass.moveMeshListClick = {
- "x" : pickedPoint.x, "y" : pickedPoint.y, "z" : pickedPoint.z
- };
- console.log(
- "thisClass.moveMeshListClick",
- thisClass.moveMeshListClick
- );
- thisClass.moveMeshList = [];
- // 记录点击的时候的物体的坐标
- for (let i = 0; i < meshList.length; i++) {
- let thisMeshId = meshList[i];
- let thisObjMesh = objScene.getMeshById(thisMeshId);
- if (thisObjMesh != null && thisObjMesh != undefined) {
- // 设置为不可选中
- thisObjMesh.isPickable = false;
- let addJson = {
- "meshId" : thisObjMesh.id,
- "x" : thisObjMesh.absolutePosition.x,
- "y" : thisObjMesh.absolutePosition.y,
- "z" : thisObjMesh.absolutePosition.z,
- };
- thisClass.moveMeshList.push(
- // 必须转换下,这样就是独立的对象
- JSON.parse(JSON.stringify(addJson))
- );
- }
- }
-
- return thisClass;
- }
- /**
- * 重置为不是拖拽逻辑
- */
- moveMeshListReset = function() {
- let thisClass = this;
-
- let objThreeWorldEventMain = this.objThreeWorldEventMain;
- let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
- let objIframe = objThreeWorldEventMain.objIframe;
- let objScene = objThreeWorldEventMain.objScene;
- let BABYLON = objThreeWorldEventMain.BABYLON;
- let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
- // 先将对应的物体,恢复可以选中
- if (thisClass.moveMeshList.length > 0) {
- for (let i = 0; i < thisClass.moveMeshList.length; i++) {
- let thisConfig = thisClass.moveMeshList[i];
- let thisMeshId = thisConfig["meshId"];
- let thisObjMesh = objScene.getMeshById(thisMeshId);
- if (thisObjMesh != null && thisObjMesh != undefined) {
- // 设置为可选中
- thisObjMesh.isPickable = true;
- }
- }
- }
- thisClass.moveMeshList = [];
- thisClass.moveCameraRadius = null;
- thisClass.moveCameraAlpha = null;
- thisClass.moveCameraBeta = null;
- }
-
- /**
- * 更新被拖拽物体的位置
- */
- moveMeshListCoordinateUpdate = function() {
- let thisClass = this;
- let objThreeWorldEventMain = this.objThreeWorldEventMain;
- let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
- let objIframe = objThreeWorldEventMain.objIframe;
- let objScene = objThreeWorldEventMain.objScene;
- let BABYLON = objThreeWorldEventMain.BABYLON;
- let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
- if (thisClass.moveMeshList.length > 0) {
- // 追加的xyz坐标
- var addPosition = {
- "x" : thisClass.moveCoordinate.x - thisClass.moveMeshListClick.x,
- "y" : thisClass.moveCoordinate.y - thisClass.moveMeshListClick.y,
- "z" : thisClass.moveCoordinate.z - thisClass.moveMeshListClick.z,
- };
-
- for (let i = 0; i < thisClass.moveMeshList.length; i++) {
- let thisConfig = thisClass.moveMeshList[i];
- let thisMeshId = thisConfig["meshId"];
- let thisObjMesh = objScene.getMeshById(thisMeshId);
- if (thisObjMesh != null && thisObjMesh != undefined) {
-
- // 一定要用绝对坐标更新,这样才可以解决不同模型轴向,问题导致设置 position 会各种出错
- thisObjMesh.setAbsolutePosition(
- new BABYLON.Vector3(
- parseFloat(thisConfig["x"]) + addPosition.x,
- parseFloat(thisConfig["y"]) + addPosition.y,
- parseFloat(thisConfig["z"]) + addPosition.z
- )
- );
-
- }
- }
- }
- }
-
- /**
- * 将当前的物体列表,回归到最初原始的坐标位置
- */
- moveMeshListResetPosition = function () {
- let thisClass = this;
- let objThreeWorldEventMain = this.objThreeWorldEventMain;
- let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
- let objIframe = objThreeWorldEventMain.objIframe;
- let objScene = objThreeWorldEventMain.objScene;
- let BABYLON = objThreeWorldEventMain.BABYLON;
- let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
- if (thisClass.moveMeshList.length > 0) {
-
- for (let i = 0; i < thisClass.moveMeshList.length; i++) {
- let thisConfig = thisClass.moveMeshList[i];
- let thisMeshId = thisConfig["meshId"];
- let thisObjMesh = objScene.getMeshById(thisMeshId);
- if (thisObjMesh != null && thisObjMesh != undefined) {
-
- // 一定要用绝对坐标更新,这样才可以解决不同模型轴向,问题导致设置 position 会各种出错
- thisObjMesh.setAbsolutePosition(
- new BABYLON.Vector3(
- parseFloat(thisConfig["x"]),
- parseFloat(thisConfig["y"]),
- parseFloat(thisConfig["z"])
- )
- );
-
- }
- }
- }
- }
-
- /**
- * 鼠标移动的时候
- * pickResult 点击的具体坐标,物体等信息
- */
- clickMoveMeshEvent = function(pickResult) {
- let thisClass = this;
- let objThreeWorldEventMain = this.objThreeWorldEventMain;
- let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
- let objIframe = objThreeWorldEventMain.objIframe;
- let objScene = objThreeWorldEventMain.objScene;
- let BABYLON = objThreeWorldEventMain.BABYLON;
- let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
-
- // console.log(
- // "鼠标移动的时候", pickResult
- // );
- // 处理中则不做处理
- if (QingXiCheAndQvCarEvent.find().eventEnd != 0) {
- return this;
- }
- // 此时移动的坐标
- let pickedPoint = pickResult["pickedPoint"];
- thisClass.moveCoordinate = {
- "x" : pickedPoint.x, "y" : pickedPoint.y, "z" : pickedPoint.z
- };
- thisClass.moveMeshListCoordinateUpdate();
-
- return thisClass;
- }
- /**
- * 判断是否拖拽到指定的坐标范围了
- * 范围内 返回 true , 否则返回 false
- */
- dragBool = function() {
- let thisClass = this;
- let objThreeWorldEventMain = this.objThreeWorldEventMain;
- let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
- let objIframe = objThreeWorldEventMain.objIframe;
- let objScene = objThreeWorldEventMain.objScene;
- let BABYLON = objThreeWorldEventMain.BABYLON;
- let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
-
- // 当没有被点击的物体的时候,说明该逻辑是没有拖拽到附近的
- if (thisClass.moveMeshList.length <= 0) {
- return false;
- }
- // 最终应该拖拽到哪个坐标附近
- let targetPosition = {
- "x" : -0.00247241766192019,
- "y" : -0.8081836700439453,
- "z" : 36.005401611328125,
- }
- // 得到两点之间的距离
- let thisVector3distanceTo = BABYLON.Vector3.Distance(
- new BABYLON.Vector3(parseFloat(targetPosition.x), parseFloat(targetPosition.y), parseFloat(targetPosition.z)),
- new BABYLON.Vector3(parseFloat(thisClass.moveCoordinate.x), parseFloat(thisClass.moveCoordinate.y), parseFloat(thisClass.moveCoordinate.z))
- );
- // console.log(
- // "拖拽后的距离", thisVector3distanceTo
- // );
- if (thisVector3distanceTo <= 0.5) {
- return true;
- }
- return false;
- }
- /**
- * 每帧被执行,用于判断距离等情况使用
- */
- renderEvent = () => {
- let thisClass = this;
- let objThreeWorldEventMain = this.objThreeWorldEventMain;
- let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
- let objIframe = objThreeWorldEventMain.objIframe;
- let objScene = objThreeWorldEventMain.objScene;
- let BABYLON = objThreeWorldEventMain.BABYLON;
- let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
-
- if (thisClass.renderEventBool == false) {
- return this;
- }
- if (QingXiCheAndQvCarEvent.find().eventEnd != 0) {
- return this;
- }
- let type = QingXiCheAndQvCarEvent.find().eventName;
- // console.log("每帧 renderEvent ---", type);
- switch (type) {
- case '行至车辆区域':
- let roleAndPositionTargetBool = objThreeWorldEventMain.roleAndPositionTargetBool();
- if (roleAndPositionTargetBool == true) {
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- thisClass.renderEventBool = false;
- // 记录当前的视角,解决人物,切换到新的视角的时候,会出现一个很长的过度问题
- objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
- ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
- confirmButtonText: '知道了',
- callback: (action) => {
-
- },
- });
- }
-
- break;
- case '绕车一周':
- // console.log("绕车一周 每帧执行");
- let aroundTheCarPointBool = objThreeWorldEventMain.aroundTheCarPointBool();
- // console.log("绕车一周 每帧执行 ---", aroundTheCarPointBool);
- if (aroundTheCarPointBool == true) {
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- thisClass.renderEventBool = false;
- // 记录当前的视角,解决人物,切换到新的视角的时候,会出现一个很长的过度问题
- objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
- ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
- confirmButtonText: '知道了',
- callback: (action) => {
-
- },
- });
- }
-
- break;
- }
-
- }
-
- /**
- * 鼠标弹起的时候
- * 根据点击到的物体,和当前的流程,触发对应的逻辑
- * pickResult 点击的具体坐标,物体等信息
- */
- main = (pickResult) => {
- let thisClass = this;
- let objThreeWorldEventMain = this.objThreeWorldEventMain;
- let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
- let objIframe = objThreeWorldEventMain.objIframe;
- let objScene = objThreeWorldEventMain.objScene;
- let BABYLON = objThreeWorldEventMain.BABYLON;
- let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
-
- console.log("typeClick 111111", QingXiCheAndQvCarEvent.find().eventName, QingXiCheAndQvCarEvent.find().eventEnd);
- if (QingXiCheAndQvCarEvent.find().eventEnd != 0) {
- return this;
- }
-
- console.log("typeClick 222222", QingXiCheAndQvCarEvent.find().eventName, QingXiCheAndQvCarEvent.find().eventEnd);
- var objMesh = pickResult.pickedMesh;
- var objPosition = pickResult.pickedPoint;
- // 获取点击对象的方向【 一定要加上 true,否则载入的获取模型的方向,会有问题 】
- // eslint-disable-next-line no-unused-vars
- var getNormal = pickResult.getNormal(true);
-
- let type = QingXiCheAndQvCarEvent.find().eventName;
-
- let dragBool = thisClass.dragBool();
- switch(type) {
-
- // 仿真模拟
- case '仿真模拟':
-
- break;
- // 人物换装
- case '人物换装':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("穿衣服_2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('人物换装_鞋子', function() {
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('人物换装_裤子', function() {
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('人物换装_上衣', function() {
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('人物换装_安全帽', function() {
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
- confirmButtonText: '知道了',
- callback: (action) => {
-
- },
- });
-
- });
- });
- });
-
- });
-
- });
-
- }
- break;
-
- // 打开车门进入驾驶室
- case '打开车门进入驾驶室':
-
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_打开左门', function() {
-
- // 切换视角
- objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车打开车门");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- // ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500 * 3, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车确定车辆双闪和工作箭头等是否正常");
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_关门', function() {
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车进入副驾驶2");
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
- confirmButtonText: '知道了',
- callback: (action) => {
-
- },
- });
- });
- });
- });
-
- });
-
- });
-
- }
- break;
-
- // 确认手刹已拉起档位是P档然后发动车辆
- case '确认手刹已拉起档位是P档然后发动车辆':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车切换挡位到空挡");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
- confirmButtonText: '知道了',
- callback: (action) => {
-
- },
- });
- });
-
- }
- break;
- // 发动车辆
- case '发动车辆':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车启动车辆");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_旋转钥匙', function() {
- QingXiCheAndQvCarEvent.find().carOpen(true);
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
- confirmButtonText: '知道了',
- callback: (action) => {
-
- },
- });
- // // 切换视角
- // objIframeEdit.modelPeopleLook(3);
- // objIframeEdit.cameraVisualAngleGetListNameGpsTo("拧动钥匙发动车辆向上");
- // objIframeEdit.roleShow(false);
- // thisTime = new Date().getTime();
- // // 控制延迟逻辑
- // ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- // ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- // QingXiCheAndQvCarEvent.find().eventEnd = 2;
- // QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- // QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- // });
- });
-
- });
-
- }
- break;
-
- // 打开车辆双闪同时开启工作双闪灯
- case '打开车辆双闪同时开启工作双闪灯':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
-
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + new Date().getTime(), {}, 1000, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- QingXiCheAndQvCarEvent.find().carShuangShanOpen(true);
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车开启双闪");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
- confirmButtonText: '知道了',
- callback: (action) => {
-
- },
- });
- });
- });
-
-
- }
- break;
- // 踩下车辆离合器5秒
- case '踩下车辆离合器5秒':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("手握方向盘");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500 * 2, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('踩下车辆离合器5秒', function() {
- WindowEvent.find().WindowCountdownOpen(5, "自定义返回数据", function(WindowCountdownOpenRes) {
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
- confirmButtonText: '知道了',
- callback: (action) => {
-
- },
- });
- });
-
- });
- });
-
- }
- break;
- // 按下取力器开关
- case '按下取力器开关':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- // objIframeEdit.cameraVisualAngleGetListNameGpsTo("观察仪表盘指示目视");
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车按下取力器开关");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
- confirmButtonText: '知道了',
- callback: (action) => {
-
- },
- });
-
- });
-
- }
- break;
- // 缓慢抬起离合器
- case '缓慢抬起离合器':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- // objIframeEdit.cameraVisualAngleGetListNameGpsTo("抬起离合器踏板2");
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车缓慢抬起离合器");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('缓慢抬起离合器', function() {
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
- confirmButtonText: '知道了',
- callback: (action) => {
-
- },
- });
-
- });
-
- });
-
- }
-
- break;
- // 确定车辆双闪和工作箭头等是否正常
- case '确定车辆双闪和工作箭头等是否正常':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车确定车辆双闪和工作箭头等是否正常");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
- confirmButtonText: '知道了',
- callback: (action) => {
-
- },
- });
- });
-
- }
- break;
- // 下车
- case '下车':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_打开左门', function() {
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车下车_1");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500 * 2, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_关门', function() {
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
- confirmButtonText: '知道了',
- callback: (action) => {
-
- },
- });
- });
-
- });
- });
-
- }
- break;
- // 下车确定安全灯显示是否正常
- case '下车确定安全灯显示是否正常':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_关门', function() {
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- // objIframeEdit.cameraVisualAngleGetListNameGpsTo("下车观察各项灯光");
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车确定安全灯是否正常");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
- confirmButtonText: '知道了',
- callback: (action) => {
-
- },
- });
-
- });
- });
-
- }
- break;
- // 在施工范围放置警示标识
- case '在施工范围放置警示标识':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();// 先记录下当前视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("清洗车摆放安全桩");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- QingXiCheAndQvComClipPlaneMeshEvent.find().anQuanZhuangLookYes(function() {
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
- confirmButtonText: '知道了',
- callback: (action) => {
-
- },
- });
-
- });
-
- });
-
- }
- break;
- // 从水管固定座上拧下高压水管
- case '从水管固定座上拧下高压水管':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("从水管固定座上拧下高压水管2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- QingXiCheAndQvComClipPlaneMeshEvent.find().jieKaiLookYes(function() {
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
-
- });
-
- }
- break;
- // 调整卷筒器到合适位置
- case '调整卷筒器到合适位置':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("调整卷筒器到合适位置2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_打开_1', function() {
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_打开_2', function() {
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- });
-
- });
-
- });
-
- }
- break;
- // 取出高压水管并放入布管器内
- case '取出高压水管并放入布管器内':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("取出高压水管并放入布管器内2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- QingXiCheAndQvComClipPlaneMeshEvent.find().zhuanDaoWeiLookYes(function() {
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
-
- });
-
- }
-
- break;
- // 套上高压水管护管器
- case '套上高压水管护管器':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("套上高压水管护管器2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_套上高压水管护管器', function() {
- QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_1(function() {
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
- });
-
- });
-
- }
- break;
- // 安装合适的高压喷头
- case '安装合适的高压喷头':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("安装合适的高压喷头2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_打开箱子', function() {
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_喷头移动到对应位置', function() {
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- });
-
- });
-
-
- });
-
- }
-
- break;
- // 将高压水管放入待施工的管道内
- case '将高压水管放入待施工的管道内':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("将高压水管放入待施工的管道内2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_将高压水管放入待施工的管道内_打开井盖', function() {
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_高压水管护管器_弯曲', function() {
-
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_喷头移动到对应位置_下井', function() {
- });
- QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_2(function() {
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
- });
- });
-
- });
-
- }
- break;
- // 在触屏操作面板上将管长清零
- case '在触屏操作面板上将管长清零':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("在触屏操作面板上将管长清零2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
-
- }
-
- break;
- // 在安全的情况开启冲水开关
- case '在安全的情况开启冲水开关':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("在安全的情况开启冲水开关2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
-
- }
- break;
-
- // 根据现场工况调节冲水压力
- case '根据现场工况调节冲水压力':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("根据现场工况调节冲水压力2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- QingXiCheAdnQvCarEventStep.find().waterEvent(true);
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
-
- }
- break;
- // 疏通管道后减小油门到初始状态
- case '疏通管道后减小油门到初始状态':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("疏通管道后减小油门到初始状态2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- QingXiCheAdnQvCarEventStep.find().waterEvent(false);
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
-
- }
- break;
- // 带压收回高压水管
- case '带压收回高压水管':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("带压收回高压水管2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
-
- }
- break;
- // 至触摸屏关闭冲水开关
- case '至触摸屏关闭冲水开关':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("至触摸屏关闭冲水开关2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
-
- }
-
- break;
-
- // 缓慢收回高压水管
- case '缓慢收回高压水管':
-
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("缓慢收回高压水管2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_高压水管护管器_变直', function() {
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_将高压水管放入待施工的管道内_关闭井盖', function() {
-
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_安装合适的高压喷头_喷头移动到对应位置_地面', function() {
- });
- QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_3(function() {
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
- });
- });
-
- });
-
- }
-
- break;
- // 拆卸高压喷头放入喷头机箱内
- case '拆卸高压喷头放入喷头机箱内':
-
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("拆卸高压喷头放入喷头机箱内2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_喷头放入箱内', function() {
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_箱子盖起', function() {
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- });
-
- });
-
-
- });
-
- }
- break;
-
- // 收起高压水管将卷筒恢复到初始状态
- case '收起高压水管将卷筒恢复到初始状态':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("收起高压水管将卷筒恢复到初始状态2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- QingXiCheAndQvComClipPlaneMeshEvent.find().ruanGuanLookYes_4(function() {
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_高压水管护管器回到原始位置', function() {
- QingXiCheAndQvComClipPlaneMeshEvent.find().zhuanDaoWeiLookYes_2(function() {
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_关闭_1', function() {
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_调整卷筒器到合适位置_关闭_2', function() {
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- });
- });
- });
-
- });
- });
-
- });
-
- }
- break;
- // 将高压水管拧到水管固定座
- case '将高压水管拧到水管固定座':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("将高压水管拧到水管固定座2");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- QingXiCheAndQvComClipPlaneMeshEvent.find().jieKaiLookYes_2(function() {
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
-
- });
-
- }
- break;
-
- // 回到驾驶室踩下车辆离合器5秒
- case '回到驾驶室踩下车辆离合器5秒':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('踩下车辆离合器5秒', function() {
- WindowEvent.find().WindowCountdownOpen(5, "自定义返回数据", function(WindowCountdownOpenRes) {
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- });
-
- });
-
- }
- break;
- // 关闭取力器开关
- case '关闭取力器开关':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("观察仪表盘指示目视");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
-
- }
- break;
- // 关闭车辆双闪和工作双闪箭头灯
- case '关闭车辆双闪和工作双闪箭头灯':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- QingXiCheAndQvCarEvent.find().carShuangShanOpen(false);
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("打开工作双闪箭头灯");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
-
-
- }
- break;
- // 车辆正常熄火
- case '车辆正常熄火':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- QingXiCheAdnQvCarEventStep.find().meshVisibility("all", false);
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("拧动钥匙发动车辆");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- QingXiCheAdnQvCarEventStep.find().animationAllTypeUpdate('清洗车_钥匙关闭_熄火', function() {
- QingXiCheAndQvCarEvent.find().carOpen(false);
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("拧动钥匙发动车辆向上");
- objIframeEdit.roleShow(false);
- thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- });
- });
-
- });
-
- }
- break;
- // //
- // case '':
- // break;
- // //
- // case '':
- // break;
- // 已完成所有任务
- case 'equipmentRepositioningWork':
-
- break;
- // 数字修复虚拟仿真-将阀门关闭停止水流
- case '数字修复虚拟仿真-将阀门关闭停止水流':
- if (QingXiCheAdnQvCarEventStep.find().meshListBool(type, objMesh.id) == true) {
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("关闭阀门完成");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- // 停止水流
- QingXiCheAdnQvCarEventStep.find().waterGuanEvent(false);
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
-
- }
- break;
- // 数字修复虚拟仿真-将橡胶垫片放置到正确的位置
- case '数字修复虚拟仿真-将橡胶垫片放置到正确的位置':
-
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
- // 范围内
- if (dragBool == true) {
-
- // 回到原始位置
- thisClass.moveMeshListResetPosition();
- WindowEvent.find().WindowTxtViewOpenEvent(
- // "现在播放橡胶垫片安装过程\n"
- // +
- "各类机械设备的法兰连接、轴承密封、泵体密封等部位都需要使用橡胶垫片,以保证设备的正常运行,防止润滑油、液压油等泄漏"
- );
- // WindowEvent.find().WindowVideoViewOpenEvent(
- // QingXiCheAndQvCarEvent.find().videoJson["02"],
- // { "自定义回调的字段" : "自定义回调的字段111" },
- // function(WindowVideoViewOpenEventRes) {
- // console.log(
- // "WindowVideoViewOpenEventRes", WindowVideoViewOpenEventRes
- // );
- // }
- // );
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("将橡胶垫片放置到正确的位置_完成");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- thisClass.xiangJiaoDianPianOk(function() {
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
- });
-
- } else {
- // 回到原始位置
- thisClass.moveMeshListResetPosition();
- // 范围外
- QingXiCheAndQvCarEvent.find().eventEnd = 0;
- }
-
- break;
- // 数字修复虚拟仿真-将抱箍放置到正确的位置
- case '数字修复虚拟仿真-将抱箍放置到正确的位置':
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 范围内
- if (dragBool == true) {
- // 回到原始位置
- thisClass.moveMeshListResetPosition();
- WindowEvent.find().WindowTxtViewOpenEvent(
- // "现在播放橡抱箍安装过程\n"
- // +
- "抱箍是一种用于抱住或箍住其他材料的紧固件,通过将两个或多个部件紧紧固定在一起,起到连接、支撑或加固的作用."
- + "通常由箍板、翼板、拉结筋板、螺栓及内衬垫构成。其中,箍板是主要的抱紧部件,翼板用于增加连接面积或提供额外的支撑点,拉结筋板则增强箍板的强度和稳定性,螺栓用于将抱箍紧固,内衬垫则可增加摩擦力或保护被箍物体的表面"
- );
-
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("将抱箍放置到正确的位置_完成");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- thisClass.baoGuOk(function() {
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
-
- });
- });
-
- } else {
- // 回到原始位置
- thisClass.moveMeshListResetPosition();
- // 范围外
- QingXiCheAndQvCarEvent.find().eventEnd = 0;
- }
- break;
- // 数字修复虚拟仿真-将插销安装到正确的位置
- case '数字修复虚拟仿真-将插销安装到正确的位置':
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 范围内
- if (dragBool == true) {
- // 回到原始位置
- thisClass.moveMeshListResetPosition();
- WindowEvent.find().WindowTxtViewOpenEvent(
- // "现在播放插销安装过程\n"
- // +
- "通过将销杆插入对应的销孔中,实现物体之间的连接或锁定。利用销杆与销孔之间的配合精度和摩擦力,保持连接的稳定性。带有锁止机构的插销,通过特定的操作(如旋转、按压等)使锁止部件卡住销杆,防止其意外拔出,增强锁定效果。"
- );
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("将插销安装到正确的位置_完成");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- thisClass.chaXiaoOk(function() {
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- });
- });
-
- } else {
- // 回到原始位置
- thisClass.moveMeshListResetPosition();
- // 范围外
- QingXiCheAndQvCarEvent.find().eventEnd = 0;
- }
- break;
- // 数字修复虚拟仿真-将螺丝安装到正确的位置
- case '数字修复虚拟仿真-将螺丝安装到正确的位置':
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 范围内
- if (dragBool == true) {
- // 回到原始位置
- thisClass.moveMeshListResetPosition();
- WindowEvent.find().WindowTxtViewOpenEvent(
- // "现在播放螺丝安装过程\n"
- // +
- "螺丝通常由头部和螺纹杆两部分组成。头部有不同的形状,如圆形、方形、六角形等,以便使用相应的工具进行拧紧或松开操作。螺纹杆上有螺旋状的螺纹,用于与螺母或带有内螺纹的部件配合。"
- );
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("将螺丝安装到正确的位置_完成");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- thisClass.luoSiOk(function() {
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- });
- });
-
- } else {
- // 回到原始位置
- thisClass.moveMeshListResetPosition();
- // 范围外
- QingXiCheAndQvCarEvent.find().eventEnd = 0;
- }
- break;
- // 数字修复虚拟仿真-用扳手将螺丝旋紧螺丝
- case '数字修复虚拟仿真-用扳手将螺丝旋紧螺丝':
-
- // 切换成正在处理中
- QingXiCheAndQvCarEvent.find().eventEnd = 1;
-
- // 范围内
- if (dragBool == true) {
- // 回到原始位置
- thisClass.moveMeshListResetPosition();
- WindowEvent.find().WindowTxtViewOpenEvent(
- // "现在播放扳手使用过程\n"
- // +
- "扳手通常由头部和手柄两部分组成。头部是与螺栓或螺母接触并施加扭矩的部分,根据不同的类型有各种形状和结构;手柄则用于握持和施加力,一般为杆状,以提供足够的杠杆作用。"
- );
- // 切换视角
- objIframeEdit.modelPeopleLook(3);
- objIframeEdit.cameraVisualAngleGetListNameGpsTo("用扳手将螺丝旋紧螺丝_完成");
- objIframeEdit.roleShow(false);
- let thisTime = new Date().getTime();
- // 控制延迟逻辑
- ComVal.find().fpsEventAdd("type_click_" + thisTime, {}, 1500, function(fpsEventAddRet) {
- ComVal.find().fpsEventDel(fpsEventAddRet.code);
- thisClass.banShouOk(function() {
-
- QingXiCheAndQvCarEvent.find().eventEnd = 2;
- QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
- QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
- });
- });
-
- } else {
- // 回到原始位置
- thisClass.moveMeshListResetPosition();
- // 范围外
- QingXiCheAndQvCarEvent.find().eventEnd = 0;
- }
-
- break;
- // //
- // case '':
- // break;
- // //
- // case '':
- // break;
-
- default:
-
- break;
-
- }
- // 上面执行完成,固定执行如下逻辑
- thisClass.moveMeshListReset();
-
- }
-
- /**
- * 根据不同类型,触发对应物体列表高亮逻辑
- * type 对应类型操作高亮
- */
- meshListComHighlightEvent = (type) => {
- let thisClass = this;
- let objThreeWorldEventMain = this.objThreeWorldEventMain;
- let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
- let objIframe = objThreeWorldEventMain.objIframe;
- let objScene = objThreeWorldEventMain.objScene;
- let BABYLON = objThreeWorldEventMain.BABYLON;
- let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
- let meshList = [];
- // QingXiCheAndQvComHighlightLayer.find().delAll("自定义");
- // 默认不闪烁
- QingXiCheAndQvComHighlightLayer.find().flickerBool = false;
- switch (type) {
-
- case "数字修复虚拟仿真-将阀门关闭停止水流":
- meshList = [
- "model_1746598895146阀门_primitive0",
- "model_1746598895146阀门_primitive1",
- ];
- // 开启闪烁逻辑
- QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
- break;
- case "数字修复虚拟仿真-将橡胶垫片放置到正确的位置":
- meshList = [
- "model_1746598895146橡胶垫",
- ];
- // 开启闪烁逻辑
- QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
- break;
- case "数字修复虚拟仿真-将抱箍放置到正确的位置":
- meshList = [
- "model_1746598895146上箍",
- "model_1746598895146插销轴",
- "model_1746598895146下箍",
- ];
- // 开启闪烁逻辑
- QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
- break;
- case "数字修复虚拟仿真-将插销安装到正确的位置":
- meshList = [
- "model_1746598895146插销1",
- "model_1746598895146插销2",
- ];
- // 开启闪烁逻辑
- QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
- break;
- case "数字修复虚拟仿真-将螺丝安装到正确的位置":
- meshList = [
- "model_1746598895146紧箍螺丝01",
- "model_1746598895146紧箍螺丝02",
- "model_1746598895146紧箍螺丝03",
- ];
- // 开启闪烁逻辑
- QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
- break;
- case "数字修复虚拟仿真-用扳手将螺丝旋紧螺丝":
- meshList = [
- "model_1746598895146扳手",
- ];
- // 开启闪烁逻辑
- QingXiCheAndQvComHighlightLayer.find().flickerBool = true;
- break;
- case "":
- break;
- }
- for (let i = 0; i < meshList.length; i++) {
- let meshId = meshList[i];
- let objMesh = objScene.getMeshById(meshId);
- if (objMesh != null && objMesh != undefined) {
- // console.log(
- // "添加发光的物体", meshId, objMesh
- // );
- // 先去除
- QingXiCheAndQvComHighlightLayer.find().delMesh("自定义", objMesh);
- // 在添加
- QingXiCheAndQvComHighlightLayer.find().addMesh("自定义", objMesh, "rgb(79, 185, 255)");
- }
- }
- }
- /**
- * 配置被拖拽物体的列表
- * type 类型,根据不同类型进行获取
- */
- meshMoveConfig = function(type) {
- let meshList = [];
- switch(type) {
- case "数字修复虚拟仿真-将橡胶垫片放置到正确的位置":
- meshList = [
- "model_1746598895146橡胶垫",
- ];
- break;
- case "数字修复虚拟仿真-将抱箍放置到正确的位置":
- meshList = [
- "model_1746598895146上箍",
- "model_1746598895146插销轴",
- "model_1746598895146下箍",
- ];
- break;
- case "数字修复虚拟仿真-将插销安装到正确的位置":
- meshList = [
- "model_1746598895146插销1",
- "model_1746598895146插销2",
- ];
- break;
- case "数字修复虚拟仿真-将螺丝安装到正确的位置":
- meshList = [
- "model_1746598895146紧箍螺丝01",
- "model_1746598895146紧箍螺丝02",
- "model_1746598895146紧箍螺丝03",
- ];
- break;
- case "数字修复虚拟仿真-用扳手将螺丝旋紧螺丝":
- meshList = [
- "model_1746598895146扳手",
- ];
- break;
- case "":
- break;
- }
- if (meshList.length <= 0) {
- return null;
- }
- let meshJson = {};
- for (let i = 0; i < meshList.length; i++) {
- let meshId = meshList[i];
- meshJson[meshId] = meshId;
- }
- return {
- "meshList" : meshList,
- "meshJson" : meshJson,
- };
- }
-
- /**
- * 数字修复虚拟仿真-将橡胶垫片放置到正确的位置
- * callback 开启完成回调
- */
- xiangJiaoDianPianOk = (callback) => {
- let thisClass = this;
- let objThreeWorldEventMain = this.objThreeWorldEventMain;
- let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
- let objIframe = objThreeWorldEventMain.objIframe;
- let objScene = objThreeWorldEventMain.objScene;
- let BABYLON = objThreeWorldEventMain.BABYLON;
- let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
- // 播放动画列表
- let playList = [
- { "name" : "橡胶垫.001", "speed" : 2, "from" : 0, "to" : 200 },
- ];
- // 动画播放完成次数
- let playEndNum = 0;
- for (let i = 0; i < playList.length; i++) {
- let thisPlayList = playList[i];
- ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
- thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
- function(state, objAnimation) {
- if (state == "播放完成") {
- playEndNum += 1;
- if (playEndNum >= playList.length) {
- callback("yes");
- }
-
- }
-
- }
- );
- }
- }
- /**
- * 数字修复虚拟仿真-将抱箍放置到正确的位置
- * callback 开启完成回调
- */
- baoGuOk = (callback) => {
- let thisClass = this;
- let objThreeWorldEventMain = this.objThreeWorldEventMain;
- let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
- let objIframe = objThreeWorldEventMain.objIframe;
- let objScene = objThreeWorldEventMain.objScene;
- let BABYLON = objThreeWorldEventMain.BABYLON;
- let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
- // 播放动画列表
- let playList = [
- { "name" : "上箍", "speed" : 2, "from" : 0, "to" : 300 },
- { "name" : "插销轴.001", "speed" : 2, "from" : 0, "to" : 200 },
- { "name" : "下箍.001", "speed" : 2, "from" : 0, "to" : 300 },
- ];
- // 动画播放完成次数
- let playEndNum = 0;
- for (let i = 0; i < playList.length; i++) {
- let thisPlayList = playList[i];
- ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
- thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
- function(state, objAnimation) {
- if (state == "播放完成") {
- playEndNum += 1;
- if (playEndNum >= playList.length) {
- callback("yes");
- }
-
- }
-
- }
- );
- }
- }
- /**
- * 数字修复虚拟仿真-将插销安装到正确的位置
- * callback 开启完成回调
- */
- chaXiaoOk = function(callback) {
- let thisClass = this;
- let objThreeWorldEventMain = this.objThreeWorldEventMain;
- let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
- let objIframe = objThreeWorldEventMain.objIframe;
- let objScene = objThreeWorldEventMain.objScene;
- let BABYLON = objThreeWorldEventMain.BABYLON;
- let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
- // 播放动画列表
- let playList = [
- { "name" : "插销1.001", "speed" : 2, "from" : 300, "to" : 400 },
- { "name" : "插销2.001", "speed" : 2, "from" : 300, "to" : 400 },
- ];
- // 动画播放完成次数
- let playEndNum = 0;
- for (let i = 0; i < playList.length; i++) {
- let thisPlayList = playList[i];
- ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
- thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
- function(state, objAnimation) {
- if (state == "播放完成") {
- playEndNum += 1;
- if (playEndNum >= playList.length) {
- callback("yes");
- }
-
- }
-
- }
- );
- }
- }
- /**
- * 数字修复虚拟仿真-将螺丝安装到正确的位置
- * callback 开启完成回调
- */
- luoSiOk = function(callback) {
- let thisClass = this;
- let objThreeWorldEventMain = this.objThreeWorldEventMain;
- let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
- let objIframe = objThreeWorldEventMain.objIframe;
- let objScene = objThreeWorldEventMain.objScene;
- let BABYLON = objThreeWorldEventMain.BABYLON;
- let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
- // 播放动画列表
- let playList = [
- { "name" : "紧箍螺丝01.001", "speed" : 2, "from" : 400, "to" : 502 },
- { "name" : "紧箍螺丝02.001", "speed" : 2, "from" : 400, "to" : 502 },
- { "name" : "紧箍螺丝03|", "speed" : 2, "from" : 400, "to" : 502 },
- ];
- // 动画播放完成次数
- let playEndNum = 0;
- for (let i = 0; i < playList.length; i++) {
- let thisPlayList = playList[i];
- ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
- thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
- function(state, objAnimation) {
- if (state == "播放完成") {
- playEndNum += 1;
- if (playEndNum >= playList.length) {
- callback("yes");
- }
-
- }
-
- }
- );
- }
- }
- /**
- * 数字修复虚拟仿真-用扳手将螺丝旋紧螺丝
- * callback 开启完成回调
- */
- banShouOk = function(callback) {
- let thisClass = this;
- let objThreeWorldEventMain = this.objThreeWorldEventMain;
- let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
- let objIframe = objThreeWorldEventMain.objIframe;
- let objScene = objThreeWorldEventMain.objScene;
- let BABYLON = objThreeWorldEventMain.BABYLON;
- let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
- // 播放动画列表
- let playList = [
- { "name" : "扳手.001", "speed" : 2, "from" : 500, "to" : 802 },
- ];
- // 动画播放完成次数
- let playEndNum = 0;
- for (let i = 0; i < playList.length; i++) {
- let thisPlayList = playList[i];
- ChengGuangYuanJing.CommonVal.find().animationGroupsEventCallback(
- thisPlayList.name, 'start', thisPlayList.speed, thisPlayList.from, thisPlayList.to, false, null,
- function(state, objAnimation) {
- if (state == "播放完成") {
- playEndNum += 1;
- if (playEndNum >= playList.length) {
- callback("yes");
- }
-
- }
-
- }
- );
- }
- }
-
- }
|