4 <meta charset="utf-8"><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 <title>Loading Rocks'n'Diamonds</title>
7 <body style="background:black;text-align:center;vertical-align:middle;">
8 <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex=-1></canvas>
9 <script type='text/javascript'>
17 var element = document.getElementById('output');
18 if (element) element.value = ''; // clear browser cache
19 return function(text) {
20 if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
24 printErr: function(text) {
25 if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
26 if(text.startsWith("[FATAL]")) console.error(text);
27 else console.warn(text);
29 setStatus: function(text) {/*if(text == '') { document.title = "Rocks'n'Diamonds (stopped)"; } */},
32 document.title = "Rocks'n'Diamonds (exited)";
35 var canvas = document.getElementById('canvas');
37 // As a default initial behavior, pop up an alert when webgl context is lost. To make your
38 // application robust, you may want to override this behavior before shipping!
39 // See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
40 canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
45 monitorRunDependencies: function(left) {
46 this.totalDependencies = Math.max(this.totalDependencies, left);
49 window.onerror = function(event) {
50 alert("An error occurred, see console.");
51 document.title = "Rocks'n'Diamonds (aborted)";
54 <script async type="text/javascript" src="rocksndiamonds.js"></script>