Browse Source

日常开发

林旭祥 4 weeks ago
parent
commit
9ef0c3ebe6
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/views/game/football.vue

+ 3 - 3
src/views/game/football.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="game-container">
     <div id="gameCanvas" class="game-canvas"></div>
-    <!-- <canvas ref="canvasRef" :width="clientObj.width" :height="clientObj.height"
-      style="position:fixed;left: 0; top: 0; z-index: 999;"></canvas> -->
+    <canvas ref="canvasRef" :width="clientObj.width" :height="clientObj.height"
+      style="position:fixed;left: 0; top: 0; z-index: 999;"></canvas>
     <!-- 游戏启动界面 -->
     <div v-if="currentScene === 'start'" class="gamestart">
       <img v-if="currentScene === 'start'" src="/static/images/football/game_start.jpg" class="start_bg" />
@@ -1343,7 +1343,7 @@ const getInit = async () => {
         boxes.value = [{ x: arr[0], y: arr[3] }, { x: arr[0], y: arr[1] }, { x: arr[2], y: arr[1] }, { x: arr[2], y: arr[3] }]
         proportion.value = (clientObj.value.height / (arr[3] - arr[1])).toFixed(2);
       }
-      //getCanvas();
+      getCanvas();
     }
     if (e?.cmd == 'terminate_bodyposecontroller') {
       if (e?.code == 0) {