Przeglądaj źródła

3dModeling buildingCreate.js 徐寅秋 commit at 2020-10-30

徐寅秋 4 lat temu
rodzic
commit
17bf3360da
1 zmienionych plików z 31 dodań i 0 usunięć
  1. 31 0
      3dModeling/zhhry11/buildingCreate.js

+ 31 - 0
3dModeling/zhhry11/buildingCreate.js

@@ -247,3 +247,34 @@ function registerEvent() {
             $('#horizontalExpansion').css({ 'display': 'none' });
             $('#verticalExpansion').css({ 'display': 'none' });
             // 进入园区层级
+            if (ev.object.type == 'Campus') {
+                if (building != null) {
+                    exitBuildingCloseFloor(building);
+                    $('#horizontalExpansion').removeClass('active');
+                    $('#verticalExpansion').removeClass('active');
+                    building = null;
+                }
+            }
+        }
+        if (skyBox != null) {
+            app.skyBox = skyBox;
+        }
+        // 重新创建小地图
+        if ($('#miniMap').hasClass('active')) {
+            destoryMiniMap();
+            createMiniMap();
+        }
+    });
+    // 行走按钮的鼠标点击事件
+    $('#moveByFps').on('click', function () {
+        stopRotate();
+        if ($(this).hasClass('active')) {
+            $(this).removeClass('active');
+            if (box != null) {
+                // 恢复默认双击进入层级事件
+                app.resumeEvent(THING.EventType.DBLClick, '*', THING.EventTag.LevelEnterOperation);
+                // 恢复默认右键退出层级事件
+                app.resumeEvent(THING.EventType.Click, '*', THING.EventTag.LevelBackOperation);
+                box.destroy();
+                box = null;
+            }