zhouenguang 3 年之前
父節點
當前提交
168ffbef50
共有 1 個文件被更改,包括 8 次插入6 次删除
  1. 8 6
      index.html

+ 8 - 6
index.html

@@ -74,7 +74,9 @@
         z-index: 10000;
         top: 0;
         left: 0;
-      "></div>
+      ">
+        <button id = "enterBtn">点击进入</button>
+      </div>
       <canvas id="renderCanvas"></canvas>
 
       <div id="videoTextureBox">
@@ -94,7 +96,6 @@
           id="houseTexture"
           src=""
           crossorigin="anonymous"
-          playsinline
           preload="auto"
           playsinline="true" 
           muted
@@ -104,7 +105,6 @@
           id="houseTextureReverse"
           src=""
           crossorigin="anonymous"
-          playsinline
           preload="auto"
           playsinline="true" 
           muted
@@ -189,9 +189,11 @@
           scene = window.app.scene;
         };
 
-        initFunction().then(() => {
-          sceneToRender = scene;
-        });
+        document.getElementById("enterBtn").onclick = async() => {
+          initFunction().then(() => {
+            sceneToRender = scene;
+          });
+        }
 
         window.scene = scene;
         window.engine = engine;