aboutsummaryrefslogtreecommitdiff
path: root/platform/javascript/godot_shell.html
diff options
context:
space:
mode:
authoreska2016-10-30 23:10:17 +0100
committereska2016-10-31 01:28:01 +0100
commitd6f2862429399844ebdd16b61da3a3c9d14fba36 (patch)
tree063bf4bebefabc373119f50e7a76471fc6b7140d /platform/javascript/godot_shell.html
parent7384a6519f377ff926906ae37844c6e8044ae083 (diff)
downloadgodot-d6f2862429399844ebdd16b61da3a3c9d14fba36.tar.gz
godot-d6f2862429399844ebdd16b61da3a3c9d14fba36.tar.zst
godot-d6f2862429399844ebdd16b61da3a3c9d14fba36.zip
Add option 'wasm' to compile to WebAssembly in web export
WebAssembly is still experimental, so disabled by default. The HTML shell file now uses $GODOT_BASE, a placeholder for the base filename, instead of $GODOT_JS, $GODOT_MEM and $GODOT_FS.
Diffstat (limited to '')
-rw-r--r--platform/javascript/godot_shell.html (renamed from tools/dist/html_fs/godot.html)21
1 files changed, 2 insertions, 19 deletions
diff --git a/tools/dist/html_fs/godot.html b/platform/javascript/godot_shell.html
index c354826e1..3170d2bb9 100644
--- a/tools/dist/html_fs/godot.html
+++ b/platform/javascript/godot_shell.html
@@ -351,24 +351,7 @@
};
};
//]]></script>
- <script type="text/javascript" src="$GODOT_FS"></script>
- <script>
- (function() {
- var memoryInitializer = "$GODOT_MEM";
- 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 = "$GODOT_JS";
- document.body.appendChild(script);
- </script>
+ <script type="text/javascript" src="$GODOT_BASEfs.js"></script>
+ {{{ SCRIPT }}}
</body>
</html>