-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.html
More file actions
72 lines (66 loc) · 2.12 KB
/
Copy pathshell.html
File metadata and controls
72 lines (66 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Dear ImGui Emscripten example</title>
<style>
body {
margin: 0;
background-color: white
}
.emscripten {
position: absolute;
top: 0px;
left: 0px;
padding-right: 0;
margin-left: auto;
margin-right: auto;
display: block;
overflow: hidden;
width: 100%;
image-rendering: optimizeSpeed;
image-rendering: auto;
}
/* the canvas *must not* have any border or padding, or mouse coords will be wrong */
canvas.emscripten {
border: 0px none;
background-color: white;
}
</style>
</head>
<body>
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
<script type='text/javascript'>
var Module = {
preRun: [],
postRun: [],
print: (function () {
return function (text) {
text = Array.prototype.slice.call(arguments).join(' ');
console.log(text);
};
})(),
printErr: function (text) {
text = Array.prototype.slice.call(arguments).join(' ');
console.error(text);
},
canvas: (function () {
var canvas = document.getElementById('canvas');
//canvas.addEventListener("webglcontextlost", function(e) { alert('FIXME: WebGL context lost, please reload the page'); e.preventDefault(); }, false);
return canvas;
})(),
setStatus: function (text) {
console.log("status: " + text);
},
monitorRunDependencies: function (left) {
// no run dependencies to log
}
};
window.onerror = function () {
console.log("onerror: " + event);
};
</script>
{{{ SCRIPT }}}
</body>
</html>