index.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <!DOCTYPE html>
  2. <!--
  3. LInE - Free Education, Private Data.
  4. www.usp.br/line
  5. -->
  6. <html>
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  9. <meta name="description" content="Educational game for teaching fractions" />
  10. <meta name="keywords" content="ifractions, fraction, game, private data" />
  11. <link rel="shortcut icon" href="assets/img/scene/flag.png">
  12. <title> iFractions by LInE-IME-USP</title>
  13. <link rel="stylesheet" href="css/bootstrap.min.css">
  14. <style>
  15. /*
  16. body, .panel-body {
  17. background-color: #313857;
  18. }
  19. */
  20. #iFractions-canvas {
  21. padding: 0 auto 0 auto;
  22. margin-left: auto;
  23. margin-right: auto;
  24. display: block;
  25. }
  26. #textbox {
  27. position: absolute;
  28. margin-left: auto;
  29. margin-right: auto;
  30. top: 300px;
  31. left: 0;
  32. right: 0;
  33. text-align: center;
  34. visibility: hidden;
  35. }
  36. input[type=text] {
  37. background-color: #fff;
  38. padding: 15px 40px;
  39. box-sizing: border-box;
  40. border: 3px solid #ccc;
  41. font-size: 44px;
  42. font-family: Arial;
  43. color: #000;
  44. text-align: center;
  45. }
  46. input:focus {
  47. outline: 3px solid #85accc;
  48. }
  49. /* The Modal (background) */
  50. .modal {
  51. display: none;
  52. /* Hidden by default */
  53. position: fixed;
  54. /* Stay in place */
  55. z-index: 1;
  56. /* Sit on top */
  57. padding-top: 155px;
  58. /* Location of the box */
  59. left: 0;
  60. top: 0;
  61. width: 100%;
  62. /* Full width */
  63. height: 100%;
  64. /* Full height */
  65. overflow: auto;
  66. /* Enable scroll if needed */
  67. background-color: rgb(0, 0, 0);
  68. /* Fallback color */
  69. background-color: rgba(0, 0, 0, 0.4);
  70. /* Black w/ opacity */
  71. }
  72. /* Modal Content */
  73. .modal-content {
  74. background-color: #fefefe;
  75. margin: auto;
  76. padding: 20px;
  77. border: 1px solid #888;
  78. width: 50%;
  79. }
  80. /* The Close Button */
  81. .close {
  82. color: #aaaaaa;
  83. float: right;
  84. font-size: 28px;
  85. font-weight: bold;
  86. }
  87. .close:hover,
  88. .close:focus {
  89. color: #000;
  90. text-decoration: none;
  91. cursor: pointer;
  92. }
  93. </style>
  94. </head>
  95. <body>
  96. <div class="container">
  97. <div class="clearfix">
  98. </div>
  99. <div class="panel panel-primary">
  100. <div class="panel-heading">iFractions game :: by LInE</div>
  101. <div class="panel-body">
  102. <!-- iFractions game -->
  103. <canvas id="iFractions-canvas"></canvas>
  104. <!-- Textbox to get player name -->
  105. <div id="textbox" onsubmit="return false">
  106. <input type="text" id="textbox-content" value="" size="13" maxlength="36">
  107. </div>
  108. <!-- Display fps in debugmode -->
  109. <div id="display-fps"></div>
  110. <!-- The Modal -->
  111. <div id="myModal" class="modal">
  112. <div class="modal-content">
  113. <span class="close">&times;</span>
  114. <div id='infobox-content'></div> <!-- Modal content -->
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. <!-- Load all js files -->
  120. <script src="js/preMenu.js"></script>
  121. <script src="js/menu.js"></script>
  122. <script src="js/customMenu.js"></script>
  123. <script src="js/map.js"></script>
  124. <script src="js/circleOne.js"></script>
  125. <script src="js/squareOne.js"></script>
  126. <script src="js/squareTwo.js"></script>
  127. <script src="js/stundentReport.js"></script> <!-- FOR MOODLE -->
  128. <script src="js/integrationFunctions.js"></script> <!-- FOR MOODLE -->
  129. <script src="js/gameMechanics.js"></script>
  130. <script src="js/globals.js"></script>
  131. <script>
  132. const displayFps = document.getElementById("display-fps");
  133. canvas = document.getElementById("iFractions-canvas");
  134. canvas.width = defaultWidth;
  135. canvas.height = defaultHeight;
  136. const context = canvas.getContext("2d");
  137. info.start();
  138. // CREATING GAME STATES
  139. game.state.add('boot', bootState);
  140. game.state.add('lang', langState);
  141. game.state.add('loadLang', loadLangState);
  142. game.state.add('name', nameState);
  143. game.state.add('menu', menuState);
  144. game.state.add('customMenu', customMenuState);
  145. game.state.add('map', mapState);
  146. game.state.add('end', endState);
  147. game.state.add('squareOne', squareOne);
  148. game.state.add('circleOne', circleOne);
  149. game.state.add('squareTwo', squareTwo);
  150. // FOR MOODLE
  151. game.state.add('studentReport', studentReport);
  152. // CALLING FIRST GAME STATE
  153. game.state.start('boot');
  154. </script>
  155. </div>
  156. </body>
  157. </html>