-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add doc about assets/app_settings/emscripten
- Loading branch information
Showing
5 changed files
with
138 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// Any file in this directory will be copied to the app build directory |
66 changes: 66 additions & 0 deletions
66
_example_integration/assets/app_settings/emscripten/shell.emscripten.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<!doctype html> | ||
<html lang="en-us"> | ||
<head> | ||
<link rel="icon" type="image/x-icon" href="@HELLO_IMGUI_FAVICON@"> | ||
<!-- | ||
You could include your own custom CSS and JS here, e.g.: | ||
<script src="custom.js"></script> | ||
Any file located in assets/app_settings/emscripten/ will be copied to the build directory. | ||
--> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"/> | ||
<title>@HELLO_IMGUI_ICON_DISPLAY_NAME@</title> | ||
<style> | ||
body { margin: 0; background-color: black } | ||
.emscripten { | ||
position: absolute; | ||
top: 0px; | ||
left: 0px; | ||
margin: 0px; | ||
border: 0; | ||
width: 100%; | ||
height: 100%; | ||
overflow: hidden; | ||
display: block; | ||
image-rendering: optimizeSpeed; | ||
image-rendering: crisp-edges; | ||
-ms-interpolation-mode: nearest-neighbor; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas> | ||
<script type='text/javascript'> | ||
var Module = { | ||
preRun: [], | ||
postRun: [], | ||
print: (function() { | ||
return function(text) { | ||
text = Array.prototype.slice.call(arguments).join(' '); | ||
console.log(text); | ||
}; | ||
})(), | ||
printErr: function(text) { | ||
text = Array.prototype.slice.call(arguments).join(' '); | ||
console.error(text); | ||
}, | ||
canvas: (function() { | ||
var canvas = document.getElementById('canvas'); | ||
//canvas.addEventListener("webglcontextlost", function(e) { alert('FIXME: WebGL context lost, please reload the page'); e.preventDefault(); }, false); | ||
return canvas; | ||
})(), | ||
setStatus: function(text) { | ||
console.log("status: " + text); | ||
}, | ||
monitorRunDependencies: function(left) { | ||
// no run dependencies to log | ||
} | ||
}; | ||
window.onerror = function() { | ||
console.log("onerror: " + event); | ||
}; | ||
</script> | ||
{{{ SCRIPT }}} | ||
</body> | ||
</html> |