mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 19:48:19 +00:00
45 lines
1,003 B
HTML
45 lines
1,003 B
HTML
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<style>
|
|
.game {
|
|
position: absolute;
|
|
top: 0px;
|
|
left: 0px;
|
|
margin: 0px;
|
|
border: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
display: block;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<canvas class="game" id="canvas" width="100%" height="100%" oncontextmenu="event.preventDefault()"></canvas>
|
|
<p id="output"></p>
|
|
<script>
|
|
var Module = {
|
|
print: (function() {
|
|
var element = document.getElementById('output');
|
|
return function(text) {
|
|
element.innerHTML += text + "<br>";
|
|
};
|
|
})(),
|
|
printErr: function(text) {
|
|
if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
|
|
if (0) {
|
|
dump(text + '\n');
|
|
}
|
|
},
|
|
canvas: (function() {
|
|
var canvas = document.getElementById('canvas');
|
|
return canvas;
|
|
})()
|
|
};
|
|
</script>
|
|
<script src="DDNet.js"></script>
|
|
</body>
|
|
</html>
|