56 lines
2.2 KiB
HTML
56 lines
2.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en"::if (WIN_WIDTH == 0)::::if (WIN_HEIGHT == 0):: style="height: 100%;"::end::::end::>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="chrome=1, IE=edge">
|
|
<title>::APP_TITLE::</title>
|
|
</head>
|
|
<body style="padding: 0; margin: 0; background-color: #FFFFFF;::if (WIN_WIDTH == 0)::::if (WIN_HEIGHT == 0):: height: 100%;::end::::end::">
|
|
|
|
<!-- <div id="haxe:trace" style="position: absolute; z-index: 2147483647;::if !debug:: display: none;::end::"></div> -->
|
|
<!-- <div id="haxe:jeash" style="background-color: #::WIN_FLASHBACKGROUND::; width: ::if (WIN_WIDTH == 0)::100%::else::::WIN_WIDTH::px::end::; height: ::if (WIN_HEIGHT == 0)::100%::else::::WIN_HEIGHT::px::end::" data-framerate="::WIN_FPS::"></div> -->
|
|
|
|
<div id="canvas-container" style="background-color: #::WIN_FLASHBACKGROUND::;::if (WIN_WIDTH == 0):: width: 100%;::end::::if (WIN_HEIGHT == 0):: height: 100%;::end:: overflow:hidden;">
|
|
<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::
|
|
::if (WIN_WIDTH == 0)::::if (WIN_HEIGHT == 0)::
|
|
var container = document.getElementById("canvas-container");
|
|
Module.canvas.width = container.clientWidth;
|
|
Module.canvas.height = container.clientHeight;
|
|
|
|
window.document.addEventListener("touchmove", function (e) {
|
|
|
|
e.preventDefault ();
|
|
|
|
}, false);
|
|
|
|
window.addEventListener ("resize", function (e) {
|
|
|
|
if (Browser) {
|
|
|
|
Browser.setCanvasSize (container.clientWidth, container.clientHeight);
|
|
|
|
} else {
|
|
|
|
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>function winParameters () { return ::WIN_PARAMETERS::; }</script>
|
|
<script type="text/javascript" src="./::APP_FILE::.js"></script>
|
|
|
|
</body>
|
|
</html> |