Explorar o código

3dModeling pulic.js 朱俊杰 commit at 2021-01-15

朱俊杰 %!s(int64=4) %!d(string=hai) anos
pai
achega
37b9b9e1af
Modificáronse 1 ficheiros con 42 adicións e 0 borrados
  1. 42 0
      3dModeling/zyl281/pulic.js

+ 42 - 0
3dModeling/zyl281/pulic.js

@@ -0,0 +1,42 @@
+/**
+ * 说明:检测菜单项是否已打开
+ */
+function checkBtnActives(arr) {
+    for (let i = 0; i < arr.length; i++) {
+        let temp = arr[i];
+        if ($(temp).hasClass('active')) {
+            $(temp).removeClass('active');
+            $(temp).find('.control-menu').removeClass('actives');
+        }
+    }
+}
+/**
+ * 说明:判断是否全屏
+ */
+function checkFull() {
+    var isFull =
+        document.fullscreenElement ||
+        document.mozFullScreenElement ||
+        document.webkitFullscreenElement;
+    //to fix : false || undefined == undefined
+    if (isFull === undefined) isFull = false;
+    return isFull;
+}
+/**
+ * 说明:创建胶囊
+ */
+function createBox() {
+    if (box == null) {
+        box = app.create({
+            type: 'Thing',
+            url: 'https://model.3dmomoda.com/models/9CD08ED91F5C4E0ABB6B0833C86F2942/0/gltf/',
+            position: [0, 0, 0],
+            angle: 180,
+            scale: [1.7, 1.7, 1.7],
+            style: {
+                color: '#FF0000'
+            }
+        });
+    }
+}
+/**