Explorar o código

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

朱俊杰 %!s(int64=4) %!d(string=hai) anos
pai
achega
0ef479fd9c
Modificáronse 1 ficheiros con 28 adicións e 0 borrados
  1. 28 0
      3dModeling/sgec112/buildingCreate.js

+ 28 - 0
3dModeling/sgec112/buildingCreate.js

@@ -445,3 +445,31 @@ function registerEvent() {
 
 
 
 
 //====设备闪烁提示====
 //====设备闪烁提示====
+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;