af2022 commited on
Commit
20f9ff3
·
verified ·
1 Parent(s): 00c3870

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +10 -1
index.html CHANGED
@@ -684,6 +684,7 @@
684
  function restartGame() {
685
  endScreen.style.opacity = '0';
686
  endScreen.style.pointerEvents = 'none';
 
687
  generateTerrain();
688
  resetLander();
689
  }
@@ -848,6 +849,14 @@
848
 
849
  // Update angle with damping to prevent excessive spinning
850
  lander.angle += lander.rotationSpeed * delta;
 
 
 
 
 
 
 
 
851
 
852
  // Apply gravity
853
  lander.velocityY += gravity * delta;
@@ -1070,5 +1079,5 @@
1070
  // Start the game
1071
  window.addEventListener('load', init);
1072
  </script>
1073
- <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: absolute; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">This website has been generated by <a href="https://enzostvs-deepsite.hf.space" style="color: #fff;" target="_blank" >DeepSite</a> <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;"></p></body>
1074
  </html>
 
684
  function restartGame() {
685
  endScreen.style.opacity = '0';
686
  endScreen.style.pointerEvents = 'none';
687
+ angleIndicator.style.display = 'flex';
688
  generateTerrain();
689
  resetLander();
690
  }
 
849
 
850
  // Update angle with damping to prevent excessive spinning
851
  lander.angle += lander.rotationSpeed * delta;
852
+
853
+ // Angle checks
854
+ if (lander.angle < (- Math.PI)) {
855
+ lander.angle = 2 * Math.PI + lander.angle;
856
+ } else if (lander.angle >= (Math.PI)) {
857
+ lander.angle = lander.angle - 2 * Math.PI;
858
+ }
859
+
860
 
861
  // Apply gravity
862
  lander.velocityY += gravity * delta;
 
1079
  // Start the game
1080
  window.addEventListener('load', init);
1081
  </script>
1082
+ </body>
1083
  </html>