Sfoglia il codice sorgente

3dModeling UIAnchor.js 袁明明 commit at 2020-10-21

袁明明 4 anni fa
parent
commit
15f1ac7230
1 ha cambiato i file con 18 aggiunte e 0 eliminazioni
  1. 18 0
      3dModeling/fhl104748/UIAnchor.js

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

@@ -0,0 +1,18 @@
+/**
+ * 创建UIAnchor界面
+ * @param {Object} obj - 创建界面的父物体
+ * @param {String} value - 创建界面的类型
+ */
+function createUIAnchor(floorNum) {
+    let anchorCreateJson = {
+        type: "UIAnchor",
+        //   element: $(".pictureMarker")[0],
+        //  position: [100, -10, -21],
+        //  parent: app.query('#1F1FS01')[0],
+        //  pivotPixel: [parseFloat($(".textAndPictureMarker").css("width")) / 2, parseFloat($(".textAndPictureMarker").css("height"))],
+    }
+    var s = app.query('#' + floorNum)[0];
+    let n = Math.ceil(Math.random() * 10)
+    anchorCreateJson.element = $(".textAndPictureMarker")[0];
+    //anchorCreateJson.position = [5, 2, n];
+    anchorCreateJson.parent = app.query('#' + floorNum)[0];