Browse Source

3dModeling UIAnchor.js 韩正义 commit at 2021-01-12

韩正义 4 năm trước cách đây
mục cha
commit
cc9cca7a1a
1 tập tin đã thay đổi với 18 bổ sung0 xóa
  1. 18 0
      3dModeling/fhl104746/UIAnchor.js

+ 18 - 0
3dModeling/fhl104746/UIAnchor.js

@@ -174,3 +174,21 @@ function create_ui(deviceType, floorNum, deviceList) {
         ui = app.create({
             type: 'UIAnchor',
             parent: carList[i],
+            element: create_element(dName, deviceTypes, floorNum, ownercode),
+            localPosition: [0, 2, 0],
+            pivot: [0.5, 1] //  [0,0]即以界面左上角定位,[1,1]即以界面右下角进行定位
+        });
+        uis.push(ui);
+    }
+
+}
+// 删除界面
+function destroy_ui() {
+    if (uis) {
+        for (var i = 0; i < uis.length; i++) {
+            uis[i].destroy();
+        }
+        uis = [];
+    }
+
+}