zhouenguang 3 jaren geleden
bovenliggende
commit
282b98138d
2 gewijzigde bestanden met toevoegingen van 12 en 1 verwijderingen
  1. 8 0
      index.html
  2. 4 1
      modules/CharactorManager.js

+ 8 - 0
index.html

@@ -68,6 +68,14 @@
           left: 0;
         "
       ></video>
+      <div id="mask" style="
+        position: fixed;
+        width: 100%;
+        height: 100%;
+        z-index: 10000;
+        top: 0;
+        left: 0;
+      "></div>
       <canvas id="renderCanvas"></canvas>
 
       <div id="videoTextureBox">

+ 4 - 1
modules/CharactorManager.js

@@ -62,7 +62,10 @@ export default class CharactorManager {
 
             self.charactor.mesh.scaling.scaleInPlace(1.4);
             self.charactor.visible = false
-            setTimeout(() => self.charactor.visible = true, 1000)
+            setTimeout(() => {
+                self.charactor.visible = true
+                document.getElementById("mask").style.zIndex = "-10000"
+            }, 1000)
             
             // 初始人物位置
             self.charactor.mesh.position = new BABYLON.Vector3(