人生啊人生 10 months ago
parent
commit
bcc02bc83a

+ 6 - 5
src/components/student/CourseChapter3d.vue

@@ -191,11 +191,7 @@ const initScene = () => {
         objNewIframe.objIframe.BABYLON,
         objNewIframe.objIframe.BABYLON,
         storesObj
         storesObj
     );
     );
-
-    TypeEvent.find().typeEvent(props.config?.threeDimensionalConfig);
-
-    // TypeEvent.find().typeEvent('threeWorld_one_init');
-
+    
     TypeEvent.find().tipsBtnsUpOpenEventCallback = function(open : any) {
     TypeEvent.find().tipsBtnsUpOpenEventCallback = function(open : any) {
         tipsBtnsUpOpenEvent(open);
         tipsBtnsUpOpenEvent(open);
     }
     }
@@ -203,6 +199,11 @@ const initScene = () => {
     TypeEvent.find().tipsBtnsDownOpenEventCallback = function(open : any) {
     TypeEvent.find().tipsBtnsDownOpenEventCallback = function(open : any) {
         tipsBtnsDownOpenEvent(open);
         tipsBtnsDownOpenEvent(open);
     }
     }
+
+    ComVal.find().fpsEventAdd("threeWorld_one_init", {}, 1500, function(fpsEventAddRet : any) {
+        ComVal.find().fpsEventDel(fpsEventAddRet.code);
+        TypeEvent.find().typeEvent(props.config?.threeDimensionalConfig);
+    });
     
     
 }
 }
 
 

+ 67 - 12
src/components/student/ThreeWorldEvent/event/TypeEvent.ts

@@ -90,20 +90,35 @@ export class TypeEvent {
         this.storesObj.courseChapter3dShow.show.threeWorldMask = true;
         this.storesObj.courseChapter3dShow.show.threeWorldMask = true;
         
         
         switch(type) {
         switch(type) {
+            
+            // 仿真模拟
+            case '仿真模拟':
+                thisClass.work_1();
+                break;
 
 
-            // 初始化第一个步骤视角
-            case 'threeWorld_one_init':
+            // 请将车门打开
+            case '请将车门打开':
+                thisClass.work_2();
+                break;
 
 
-                ComVal.find().fpsEventAdd("threeWorld_one_init", {}, 1500, function(fpsEventAddRet : any) {
-                    ComVal.find().fpsEventDel(fpsEventAddRet.code);
-                    thisClass.threeWorld_one_init();
-                });
-                
+            // 请将水箱打开
+            case '请将水箱打开':
+                thisClass.work_1();
                 break;
                 break;
-                
-            // 设备拆解
-            case 'equipmentDisassembly':
-                
+
+            // 请将水管链接
+            case '请将水管链接':
+                thisClass.work_1();
+                break;
+
+            // 开始清洗
+            case '开始清洗':
+                thisClass.work_1();
+                break;
+
+            // 已完成所有任务
+            case 'equipmentRepositioningWork':
+                thisClass.work_1();
                 break;
                 break;
                 
                 
             default:
             default:
@@ -241,8 +256,48 @@ export class TypeEvent {
 
 
         thisClass.animationAllTypeUpdate('stopAll');
         thisClass.animationAllTypeUpdate('stopAll');
         
         
+    }
+
+
+    /**
+     * 仿真模拟
+     */
+    work_1 = () => {
+
+        let thisClass = this;
+        let objIframeEdit = this.objIframeEdit;
+        let objIframe = this.objIframe;
+        let objScene = this.objScene;
+        let BABYLON = this.BABYLON;
+        let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
+
+        objIframeEdit.modelPeopleLook(3);
+        objIframeEdit.cameraVisualAngleGetListNameGpsTo("车头");
+        objIframeEdit.roleShow(false);
+
+        thisClass.animationAllTypeUpdate('stopAll');
+
+    }
+
+
+    /**
+     * 请将车门打开
+     */
+    work_2 = () => {
+
+        let thisClass = this;
+        let objIframeEdit = this.objIframeEdit;
+        let objIframe = this.objIframe;
+        let objScene = this.objScene;
+        let BABYLON = this.BABYLON;
+        let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
         
         
-        
+        objIframeEdit.modelPeopleLook(3);
+        objIframeEdit.roleShow(false);
+
+        thisClass.tipsBtnsUpOpenEventCallbackMain(false);
+        thisClass.tipsBtnsDownOpenEventCallbackMain(false);
+
     }
     }