فهرست منبع

3dModeling buildingCreate.js 韩正义 commit at 2021-03-12

韩正义 4 سال پیش
والد
کامیت
75468b8bd4
1فایلهای تغییر یافته به همراه89 افزوده شده و 0 حذف شده
  1. 89 0
      3dModeling/tjby29/buildingCreate.js

+ 89 - 0
3dModeling/tjby29/buildingCreate.js

@@ -423,3 +423,92 @@ function registerEvent() {
                 $('#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);
+        }, '每帧改变透明度');
+    })
+}
+function queryDeviceStatus(evt) {
+    objArray = evt.data;
+    // objArray.forEach(function (deviceobj) {
+    //     obj = app.query("#" + deviceobj.ownerCode)[0];
+    //     obj.on('update', function () {
+    //         obj.style.color = '#FF0000'
+    //         obj.style.opacity = 0.5 + 0.5 * Math.sin(2 * app.elapsedTime / 500);
+    //     }, '每帧改变透明度');
+
+
+    // })
+    obj = app.query("#" + objArray)[0];
+    obj.on('update', function () {
+        obj.style.color = '#FF0000'
+        obj.style.opacity = 0.5 + 0.5 * Math.sin(2 * app.elapsedTime / 500);
+    }, '每帧改变透明度');
+}
+function reset(objArray) {
+    objArray.forEach(function (obj) {
+        obj.style.opacity = 1.0;
+        obj.style.color = null;
+        obj.off('update', null, '每帧改变透明度');
+    })
+}
+var timer = null;
+function getTabledata(d) {
+    var ygArray = [];
+    d.forEach(function (d) {
+        var deviceInfo = {
+            "设备编号": d.ownerCode,
+            "设备名称": d.ownerName,
+            "安装位置": d.unitinfo,
+        };
+        ygArray.push(deviceInfo)
+    })
+    // 表格数据//创建对象 book
+    var tableData = {
+
+        // 列标题
+        props: ['设备编号', '设备名称', '安装位置'],
+        // 列数据
+        items: ygArray
+    };
+    return tableData;
+}
+function createPerson(name, age, family) {
+    var o = new Object();
+    o.name = name;
+    o.age = age;
+    o.family = family;
+    o.say = function () {
+        alert(this.name);
+    }
+    return o;
+}
+function destroyPanel() {
+    var mydiv = document.getElementById('mydiv')
+    mydiv.remove();
+}