浏览代码

3dModeling buildingCreate.js 袁明明 commit at 2021-03-30

袁明明 4 年之前
父节点
当前提交
d58be7d3a4
共有 1 个文件被更改,包括 35 次插入0 次删除
  1. 35 0
      3dModeling/sgec103/buildingCreate.js

+ 35 - 0
3dModeling/sgec103/buildingCreate.js

@@ -416,3 +416,38 @@ function registerEvent() {
     app.on(THING.EventType.KeyDown, function (ev) {
     app.on(THING.EventType.KeyDown, function (ev) {
         if (ev.code == 'Escape') {
         if (ev.code == 'Escape') {
             if (box != null) {
             if (box != null) {
+                app.resumeEvent(THING.EventType.DBLClick, '*', THING.EventTag.LevelEnterOperation);
+                app.resumeEvent(THING.EventType.Click, '*', THING.EventTag.LevelBackOperation);
+                box.destroy();
+                box = null;
+                $('#moveByFps').removeClass('active');
+                restarRotate();
+            }
+            if (fpsCtrl != null) {
+                exitFps();
+                restarRotate();
+            }
+            checkBtnActives(['#mapBg', '#sceneSetting']);
+        }
+    });
+    window.onresize = function () {
+        if (!checkFull()) {
+            //要执行的动作
+            if (fullScreenState == true) {
+                $('.btn-full-screen').css('display', 'block');
+                $('.btn-narrow').css('display', 'none');
+                $('#fullScreen span').text('全屏');
+                fullScreenState = false;
+            }
+        }
+    }
+}
+
+
+//====设备闪烁提示====
+function flash(objArray) {
+    objArray.forEach(function (obj) {
+        obj.on('update', function () {
+            obj.style.color = '#FFF000'
+            obj.style.opacity = 0.5 + 0.5 * Math.sin(2 * app.elapsedTime / 500);
+        }, '每帧改变透明度');