Emscripten fixes
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
|
||||
<meta charset="utf-8">
|
||||
|
||||
|
||||
<title>::APP_TITLE::</title>
|
||||
|
||||
|
||||
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
|
||||
::if linkedLibraries::::foreach (linkedLibraries)::
|
||||
<script type="text/javascript" src="::__current__::"></script>::end::::end::
|
||||
|
||||
|
||||
<script>
|
||||
window.addEventListener ("touchmove", function (event) { event.preventDefault (); }, false);
|
||||
if (typeof window.devicePixelRatio != 'undefined' && window.devicePixelRatio > 2) {
|
||||
@@ -19,7 +19,7 @@
|
||||
meta.setAttribute ('content', 'width=device-width, initial-scale=' + (2 / window.devicePixelRatio) + ', user-scalable=no');
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
html,body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
|
||||
#content { background: #000000; width: 100%; height: 100%; }
|
||||
@@ -35,18 +35,18 @@
|
||||
font-style: normal;
|
||||
}::end::::end::
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
::foreach assets::::if (type == "font")::
|
||||
<span style="font-family: ::id::"> </span>::end::::end::
|
||||
|
||||
|
||||
<div id="content">
|
||||
<canvas id="canvas"::if (WIN_WIDTH != 0):: width="::WIN_WIDTH::px"::end::::if (WIN_HEIGHT != 0):: height="::WIN_HEIGHT::px"::end::></canvas>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
var Module = {};
|
||||
Module.canvas = document.getElementById ("canvas");
|
||||
//::if DEBUG::Module.setStatus = function (msg) { console.log (msg); };::else::Module.setStatus = function(_) {};::end::
|
||||
@@ -55,19 +55,19 @@
|
||||
var container = document.getElementById ("content");
|
||||
Module.canvas.width = container.clientWidth;
|
||||
Module.canvas.height = container.clientHeight;
|
||||
|
||||
|
||||
window.addEventListener ("resize", function (e) {
|
||||
|
||||
|
||||
Module.canvas.width = container.clientWidth;
|
||||
Module.canvas.height = container.clientHeight;
|
||||
|
||||
|
||||
}, true);::end::::end::
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
::if DEBUG::<script type="text/javascript" src="./webgl-debug.js"></script>::end::
|
||||
|
||||
|
||||
<script type="text/javascript" src="./::APP_FILE::.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user