Переглянути джерело

3dModeling buildingCreate.js 朱俊杰 commit at 2021-02-22

朱俊杰 4 роки тому
батько
коміт
689dbcf790
1 змінених файлів з 27 додано та 0 видалено
  1. 27 0
      3dModeling/tjby22/buildingCreate.js

+ 27 - 0
3dModeling/tjby22/buildingCreate.js

@@ -459,3 +459,30 @@ function queryDeviceStatus(evt) {
     //     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,
+        };