Initial commit
This commit is contained in:
63
view/_main.html
Executable file
63
view/_main.html
Executable file
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="MobileOptimized" content="640"/>
|
||||
<meta name="HandheldFriendly" content="true"/>
|
||||
<title>Xash3D Emscripten Port</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: arial;
|
||||
margin: 0;
|
||||
padding: none;
|
||||
background-color: #555555;
|
||||
color: #f0b418;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onerror=alert(event);>
|
||||
<div class="emscripten_border">
|
||||
<canvas style="display:none" class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
|
||||
</div>
|
||||
|
||||
<div style="float:left;" id="status">Downloading...</div>
|
||||
|
||||
<div style=width:100%><span id='controls'>
|
||||
<a class="glow"><span><input type="checkbox" id="resize">Resize canvas</span></a>
|
||||
<a class="glow"><span><input type="checkbox" id="pointerLock" checked>Lock/hide mouse pointer </span></a>
|
||||
<span><input type="button" value="Fullscreen" onclick="Module.requestFullscreen(document.getElementById('pointerLock').checked, document.getElementById('resize').checked)"></span>
|
||||
</span></div>
|
||||
|
||||
<!-- <textarea id="output" rows="8"></textarea><div id="asyncDialog" style="float:left"></div> -->
|
||||
|
||||
<script type='text/javascript' lsrc='../init.js'></script>
|
||||
|
||||
<script>
|
||||
// Causes the app to freeze. Maybe make async?
|
||||
function loadingDone() {
|
||||
(function() {
|
||||
// var memoryInitializer = 'xash.html.mem';
|
||||
var memoryInitializer = 'xash.html.mem' // not gonna cuz locateFile will handle it
|
||||
if (typeof Module['locateFile'] === 'function') {
|
||||
memoryInitializer = Module['locateFile'](memoryInitializer);
|
||||
} else if (Module['memoryInitializerPrefixURL']) {
|
||||
memoryInitializer = Module['memoryInitializerPrefixURL'] + memoryInitializer;
|
||||
}
|
||||
var xhr = Module['memoryInitializerRequest'] = new XMLHttpRequest();
|
||||
xhr.open('GET', memoryInitializer, true);
|
||||
xhr.responseType = 'arraybuffer';
|
||||
xhr.send(null);
|
||||
})();
|
||||
|
||||
var script = document.createElement('script');
|
||||
// script.src = "xash.js";
|
||||
script.src = instance.import['xash.js'] // temp
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user