index.html 4.4 KB

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