index.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <html>
  2. <title>Three JS </title>
  3. <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
  4. <script src="https://cdnjs.cloudflare.com/ajax/libs/pouchdb/6.2.0/pouchdb.js"></script>
  5. <script src="js/libs/pouchdb.authentication.js"></script>
  6. <script src="js/three.min.js"></script>
  7. <script src="js/libs/controls/OrbitControls.js"></script>
  8. <script src="js/libs/ImprovedNoise.js"></script>
  9. <style type="text/css">
  10. canvas{
  11. position: fixed;
  12. top:0;
  13. left:0;
  14. }
  15. .ui{
  16. position:fixed;
  17. top:0px;
  18. width: 40vw;
  19. max-height: 300px;
  20. background-color: rgba(74, 166, 247,0.5);
  21. border-radius: 5px;
  22. z-index: 10000;
  23. left: 30vw;
  24. padding:10px;
  25. margin:10px;
  26. color:white;
  27. font-family:Tahoma;
  28. font-size:18px;
  29. text-align: center;
  30. }
  31. #highscore {
  32. position: fixed;
  33. top: 10px;
  34. right: 10px;
  35. width: 200px;
  36. font-family: Tahoma;
  37. font-size:26px;
  38. font-weight: bold;
  39. min-height: 30px;
  40. border-radius: 5px;
  41. background: rgba(70,50,195, 0.85);
  42. z-index: 999;
  43. padding: 10px;
  44. color: white;
  45. text-align: center;
  46. }
  47. #lost {
  48. position: fixed;
  49. top: 100px;
  50. width: 50vw;
  51. left: 25vw;
  52. font-family: Tahoma;
  53. font-size:20px;
  54. font-weight: bold;
  55. min-height: 30px;
  56. border-radius: 15px;
  57. background: rgba(66,50,215, 0.895);
  58. z-index: 1999;
  59. padding: 10px;
  60. color: white;
  61. text-align: center;
  62. display: none;
  63. }
  64. #myscore{
  65. font-weight: 100;
  66. font-size: 26px;
  67. color: yellow;
  68. }
  69. .soundplayer{
  70. position: fixed;
  71. bottom: 10px;
  72. right: 10px;
  73. background: rgba(16,10,10, 0.895);
  74. z-index: 999;
  75. }
  76. </style>
  77. <body>
  78. <div class="ui">
  79. <div>
  80. Use 'w,a,s,d' to move the dropping shape! 'i,j,k,l' will rotate the shape around the Y_AXIS while 'u,o' around X_AXIS. Fill up the planes to make the best highscore!
  81. </div>
  82. </div>
  83. <div id="highscore">
  84. </div>
  85. <div id="lost">
  86. You finished the game with Score <br><span id="myscore"></span>
  87. <div class="table">
  88. <div class="row">
  89. <div class="col-xs-6"><b>Name</b></div>
  90. <div class="col-xs-6"><b>Score</b></div>
  91. </div>
  92. <div class="row" id="scores">
  93. </div>
  94. </div>
  95. <div class="table">
  96. <div class="row">
  97. <input type="text" name="name" id="name" placeholder="Write your name.." class="btn">
  98. <input type="button" value="Save" onclick="saveToDB()" class="btn btn-primary">
  99. </div>
  100. <div class="row">
  101. <input type="button" value="Play Again" onclick="restartGame()" class="btn btn-primary">
  102. </div>
  103. </div>
  104. </div>
  105. <div class="soundplayer">
  106. <audio controls loop autoplay="">
  107. <source src="theme.mp3" type="audio/mpeg">
  108. Your browser does not support the audio element.
  109. </audio>
  110. </div>
  111. <script src="js/GameBox.js"></script>
  112. <script src="js/Game.js"></script>
  113. <script src="js/app.js"></script>
  114. </body>
  115. </html>