-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathindex.html
29 lines (21 loc) · 877 Bytes
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</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>
<!-- Add the javascript glue code (index.js) as generated by Emscripten -->
<script src="index.js"></script>
<p>Minimal example of animating the HTML5 canvas from C++ using SDL through WebAssembly.</p>
<p>Source code: <a href="https://github.com/timhutton/sdl-canvas-wasm">https://github.com/timhutton/sdl-canvas-wasm</a></p>
</body>
</html>