-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.html
50 lines (43 loc) · 1.22 KB
/
template.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
* {
margin: 0;
padding: 0;
}
body {
overflow: hidden;
}
canvas {
background: black;
border: none;
}
</style>
<title>Raylib CMAKE Template</title>
</head>
<body>
<!-- Create the canvas that the C++ code will draw into -->
<canvas id="canvas" oncontextmenu="event.preventDefault()"></canvas>
<!-- Allow the C++ to access the canvas element -->
<script type='text/javascript'>
var Module = {
canvas: (function() { return document.getElementById('canvas'); })()
};
</script>
<script>
(function () {
function resize_canvas(){
canvas = document.getElementById("canvas");
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
}
window.addEventListener('resize', resize_canvas);
})()
</script>
<!-- Add the javascript glue code (index.js) as generated by Emscripten -->
{{{ SCRIPT }}}
</body>
</html>