fixed wasm compatibility
This commit is contained in:
35
resources/index.html
Normal file
35
resources/index.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
<style>
|
||||
* { margin: 0; padding: 0;}
|
||||
|
||||
body, html { height:100%; }
|
||||
|
||||
#canvas {
|
||||
position:absolute;
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
</style>
|
||||
<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="sdlife.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user