shaogen1995 2 rokov pred
rodič
commit
d3db5d2d98
1 zmenil súbory, kde vykonal 10 pridanie a 1 odobranie
  1. 10 1
      webNew/public/4dage.js

+ 10 - 1
webNew/public/4dage.js

@@ -6158,6 +6158,11 @@ fdage = {},
                     this.ui.bindInput(this.input)
             },
             W.prototype.rotateWhenIdle = function () {
+
+
+                // 加载完成 才需要 外部调用
+                if (!window.modelLoding) return
+
                 if (webview.rotate) return
                 rotInfo.radiusK && (webview.scene.view.radius = rotInfo.radiusK / (dom.id("fdageUI").clientWidth / dom.id("fdageUI").clientHeight)),
                     webview.scene.view.pivot = rotInfo.pivot.slice(),
@@ -6167,6 +6172,10 @@ fdage = {},
                     }, 16)
             },
             W.prototype.stopRotate = function (ifFinish) { //ifFinish是否不再自动旋转
+
+                // 加载完成 才需要 外部调用
+                if (!window.modelLoding) return
+
                 if (webview.rotate) {
                     clearInterval(webview.rotate),
                         //   console.log("clearInterval(webview.rotate)"),
@@ -6251,7 +6260,7 @@ fdage = {},
                     let dom = document.querySelector('.bacBox')
                     dom.style.opacity = 0
                     dom.style.pointerEvents = 'none'
-                  }, 500);
+                }, 500);
 
                 this.scene.view.updateView(),
                     this.ui.showActiveView(),