소스 검색

Added second joystick. Joysticks should hide on desktop and show on mobile

Gary Munnelly 2 년 전
부모
커밋
69e042500e
2개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 1
      engine/webapp/index.html
  2. 2 4
      engine/webapp/index.js

+ 2 - 1
engine/webapp/index.html

@@ -37,7 +37,8 @@
     <div id="controls">w, s, a, d = forward, back, strafe left, strafe right | &uarr;, &darr;, &larr;, &rarr; = forward, back, turn left, turn right</div>
     <div id="fps"></div>
     <canvas id="canvas" width="320" height="200"></canvas>
-    <div id="joystick" style="width:200px; height:200px; position:fixed; bottom:0px; left:0px; z-index: 99999"></div>
+    <div id="joystick-left" style="width: 30%; aspect-ratio: 1; position: fixed; bottom: 0px; left: 0px; z-index: 99999"></div>
+    <div id="joystick-right" style="width: 30%; aspect-ratio: 1; position: fixed; bottom: 0px; right: 0px; z-index: 99999"></div>
     <script src="./bootstrap.js"></script>
     <script src="./vendor/JoyStick/joy.min.js"></script>
   </body>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2 - 4
engine/webapp/index.js


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.