You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

257 lines
9.7 KiB

  1. <!doctype html>
  2. <html lang="en-us">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <title>raylib HTML5 GAME</title>
  7. <meta name="title" content="raylib HTML5 GAME">
  8. <meta name="description" content="New HTML5 videogame, developed using raylib videogames library">
  9. <meta name="keywords" content="raylib, games, html5, programming, C, C++, library, learn, videogames">
  10. <meta name="viewport" content="width=device-width">
  11. <!-- Facebook metatags for sharing -->
  12. <meta property="og:title" content="raylib HTML5 GAME">
  13. <meta property="og:image:type" content="image/png">
  14. <meta property="og:image" content="https://www.raylib.com/common/img/raylib_logo.png">
  15. <meta property="og:image" content="https://www.raylib.com/common/img/raylib_logo.png">
  16. <meta property="og:url" content="https://www.raylib.com/games">
  17. <meta property="og:site_name" content="raylib.com">
  18. <meta property="og:description" content="New hmtl5 videogame, developed using raylib videogames library">
  19. <!-- Twitter metatags for sharing -->
  20. <meta name="twitter:card" content="summary">
  21. <meta name="twitter:site" content="@raysan5">
  22. <meta name="twitter:title" content="raylib HTML5 GAME">
  23. <meta name="twitter:description" content="New HTML5 videogame, developed using raylib videogames library">
  24. <meta name="twitter:image" content="https://www.raylib.com/common/img/raylib_logo.png">
  25. <meta name="twitter:url" content="https://www.raylib.com/common/img/raylib_logo.png">
  26. <!--<link rel="stylesheet" href="./Koala Seasons by emegeme_files/main.css">-->
  27. <link rel="shortcut icon" href="https://www.raylib.com/favicon.ico">
  28. <style>
  29. body {
  30. font-family: arial;
  31. margin: 0;
  32. padding: none;
  33. }
  34. #header_part {
  35. width: 100%;
  36. height: 80px;
  37. background-color: #888888;
  38. }
  39. #logo {
  40. width:64px;
  41. height:64px;
  42. float:left;
  43. position:relative;
  44. margin:10px;
  45. background-image:url(https://www.raylib.com/common/img/raylib_logo_64x64.png);
  46. }
  47. .emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
  48. div.emscripten { text-align: center; }
  49. div.emscripten_border { border: 1px solid black; }
  50. /* the canvas *must not* have any border or padding, or mouse coords will be wrong */
  51. canvas.emscripten { border: 0px none; background: black; width: 100% }
  52. #emscripten_logo {
  53. display: inline-block;
  54. margin: 0;
  55. }
  56. .spinner {
  57. height: 30px;
  58. width: 30px;
  59. margin: 0;
  60. margin-top: 20px;
  61. margin-left: 20px;
  62. display: inline-block;
  63. vertical-align: top;
  64. -webkit-animation: rotation .8s linear infinite;
  65. -moz-animation: rotation .8s linear infinite;
  66. -o-animation: rotation .8s linear infinite;
  67. animation: rotation 0.8s linear infinite;
  68. border-left: 5px solid black;
  69. border-right: 5px solid black;
  70. border-bottom: 5px solid black;
  71. border-top: 5px solid red;
  72. border-radius: 100%;
  73. background-color: rgb(245, 245, 245);
  74. }
  75. @-webkit-keyframes rotation {
  76. from {-webkit-transform: rotate(0deg);}
  77. to {-webkit-transform: rotate(360deg);}
  78. }
  79. @-moz-keyframes rotation {
  80. from {-moz-transform: rotate(0deg);}
  81. to {-moz-transform: rotate(360deg);}
  82. }
  83. @-o-keyframes rotation {
  84. from {-o-transform: rotate(0deg);}
  85. to {-o-transform: rotate(360deg);}
  86. }
  87. @keyframes rotation {
  88. from {transform: rotate(0deg);}
  89. to {transform: rotate(360deg);}
  90. }
  91. #status {
  92. display: inline-block;
  93. vertical-align: top;
  94. margin-top: 30px;
  95. margin-left: 20px;
  96. font-weight: bold;
  97. color: rgb(40, 40, 40);
  98. }
  99. #progress {
  100. height: 20px;
  101. width: 30px;
  102. }
  103. #controls {
  104. display: inline-block;
  105. float: right;
  106. vertical-align: top;
  107. margin-top: 30px;
  108. margin-right: 20px;
  109. }
  110. #output {
  111. width: 100%;
  112. height: 140px;
  113. margin: 0 auto;
  114. margin-top: 10px;
  115. display: block;
  116. background-color: black;
  117. color: rgb(37, 174, 38);
  118. font-family: 'Lucida Console', Monaco, monospace;
  119. outline: none;
  120. }
  121. </style>
  122. </head>
  123. <body>
  124. <div id="header_part">
  125. <a id="logo" href="https://www.raylib.com"></a>
  126. <div class="spinner" id='spinner'></div>
  127. <div class="emscripten" id="status">Downloading...</div>
  128. <span id='controls'>
  129. <span><input type="button" value="Fullscreen" onclick="Module.requestFullscreen(false, false)"></span>
  130. </span>
  131. <div class="emscripten">
  132. <progress value="0" max="100" id="progress" hidden=1></progress>
  133. </div>
  134. </div>
  135. <div class="emscripten_border">
  136. <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
  137. </div>
  138. <textarea id="output" rows="8"></textarea>
  139. <script type='text/javascript' src="https://cdn.jsdelivr.net/gh/eligrey/FileSaver.js/dist/FileSaver.min.js"> </script>
  140. <script type='text/javascript'>
  141. function SaveFileFromMEMFSToDisk(memoryFSname, localFSname) // This can be called by C/C++ code
  142. {
  143. var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
  144. var data = FS.readFile(memoryFSname);
  145. var blob;
  146. if (isSafari) blob = new Blob([data.buffer], {type: "application/octet-stream"});
  147. else blob = new Blob([data.buffer], {type: "application/octet-binary"});
  148. // NOTE: SaveAs Dialog is a browser setting. For example, in Google Chrome,
  149. // in Settings/Advanced/Downloads section you have a setting:
  150. // 'Ask where to save each file before downloading' - which you can set true/false.
  151. // If you enable this setting it would always ask you and bring the SaveAs Dialog
  152. saveAs(blob, localFSname);
  153. }
  154. </script>
  155. <script type='text/javascript'>
  156. var statusElement = document.getElementById('status');
  157. var progressElement = document.getElementById('progress');
  158. var spinnerElement = document.getElementById('spinner');
  159. var Module = {
  160. preRun: [],
  161. postRun: [],
  162. print: (function() {
  163. var element = document.getElementById('output');
  164. if (element) element.value = ''; // clear browser cache
  165. return function(text) {
  166. if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
  167. // These replacements are necessary if you render to raw HTML
  168. //text = text.replace(/&/g, "&amp;");
  169. //text = text.replace(/</g, "&lt;");
  170. //text = text.replace(/>/g, "&gt;");
  171. //text = text.replace('\n', '<br>', 'g');
  172. console.log(text);
  173. if (element) {
  174. element.value += text + "\n";
  175. element.scrollTop = element.scrollHeight; // focus on bottom
  176. }
  177. };
  178. })(),
  179. printErr: function(text) {
  180. if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
  181. if (0) { // XXX disabled for safety typeof dump == 'function') {
  182. dump(text + '\n'); // fast, straight to the real console
  183. } else {
  184. console.error(text);
  185. }
  186. },
  187. canvas: (function() {
  188. var canvas = document.getElementById('canvas');
  189. // As a default initial behavior, pop up an alert when webgl context is lost. To make your
  190. // application robust, you may want to override this behavior before shipping!
  191. // See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
  192. canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
  193. return canvas;
  194. })(),
  195. setStatus: function(text) {
  196. if (!Module.setStatus.last) Module.setStatus.last = { time: Date.now(), text: '' };
  197. if (text === Module.setStatus.text) return;
  198. var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
  199. var now = Date.now();
  200. if (m && now - Date.now() < 30) return; // if this is a progress update, skip it if too soon
  201. if (m) {
  202. text = m[1];
  203. progressElement.value = parseInt(m[2])*100;
  204. progressElement.max = parseInt(m[4])*100;
  205. progressElement.hidden = false;
  206. spinnerElement.hidden = false;
  207. } else {
  208. progressElement.value = null;
  209. progressElement.max = null;
  210. progressElement.hidden = true;
  211. if (!text) spinnerElement.style.display = 'none';
  212. }
  213. statusElement.innerHTML = text;
  214. },
  215. totalDependencies: 0,
  216. monitorRunDependencies: function(left) {
  217. this.totalDependencies = Math.max(this.totalDependencies, left);
  218. Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
  219. }
  220. };
  221. Module.setStatus('Downloading...');
  222. window.onerror = function(event) {
  223. // TODO: do not warn on ok events like simulating an infinite loop or exitStatus
  224. Module.setStatus('Exception thrown, see JavaScript console');
  225. spinnerElement.style.display = 'none';
  226. Module.setStatus = function(text) {
  227. if (text) Module.printErr('[post-exception status] ' + text);
  228. };
  229. };
  230. </script>
  231. {{{ SCRIPT }}}
  232. </body>
  233. </html>