Explorar o código

3dModeling UIAnchor.js 姚强 commit at 2021-03-12

姚强 %!s(int64=4) %!d(string=hai) anos
pai
achega
e7dadaf819
Modificáronse 1 ficheiros con 20 adicións e 0 borrados
  1. 20 0
      3dModeling/xyxfdl/UIAnchor.js

+ 20 - 0
3dModeling/xyxfdl/UIAnchor.js

@@ -0,0 +1,20 @@
+/**
+ * 创建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];
+    anchorCreateJson.pivotPixel = [parseFloat($(".textAndPictureMarker").css("width")) / 2, parseFloat($(".textAndPictureMarker").css("height"))];
+    let tempTopCard = app.create(anchorCreateJson);  // 创建顶牌