選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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