diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/dist/html/editor.html | 8 | ||||
-rw-r--r-- | misc/dist/html/full-size.html | 5 | ||||
-rw-r--r-- | misc/dist/html/service-worker.js | 12 |
3 files changed, 15 insertions, 10 deletions
diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html index 93afbf085d..e5c68c6338 100644 --- a/misc/dist/html/editor.html +++ b/misc/dist/html/editor.html @@ -23,7 +23,7 @@ <link id="-gd-engine-icon" rel="icon" type="image/png" href="favicon.png"> <link rel="apple-touch-icon" type="image/png" href="favicon.png"> <link rel="manifest" href="manifest.json"> - <title>Godot Engine Web Editor (@GODOT_VERSION@)</title> + <title>Godot Engine Web Editor (___GODOT_VERSION___)</title> <style> *:focus { /* More visible outline for better keyboard navigation. */ @@ -294,7 +294,7 @@ a:active { <br > <img src="logo.svg" alt="Godot Engine logo" width="1024" height="414" style="width: auto; height: auto; max-width: min(85%, 50vh); max-height: 250px"> <br > - @GODOT_VERSION@ + ___GODOT_VERSION___ <br > <a href="releases/">Need an old version?</a> <br > @@ -384,7 +384,9 @@ window.addEventListener('load', () => { }); } - const missing = Engine.getMissingFeatures(); + const missing = Engine.getMissingFeatures({ + threads: ___GODOT_THREADS_ENABLED___, + }); if (missing.length) { // Display error dialog as threading support is required for the editor. document.getElementById('startButton').disabled = 'disabled'; diff --git a/misc/dist/html/full-size.html b/misc/dist/html/full-size.html index 6710cb1533..54571e27c7 100644 --- a/misc/dist/html/full-size.html +++ b/misc/dist/html/full-size.html @@ -136,6 +136,7 @@ body { <script src="$GODOT_URL"></script> <script> const GODOT_CONFIG = $GODOT_CONFIG; +const GODOT_THREADS_ENABLED = $GODOT_THREADS_ENABLED; const engine = new Engine(GODOT_CONFIG); (function () { @@ -213,7 +214,9 @@ const engine = new Engine(GODOT_CONFIG); initializing = false; } - const missing = Engine.getMissingFeatures(); + const missing = Engine.getMissingFeatures({ + threads: GODOT_THREADS_ENABLED, + }); if (missing.length !== 0) { const missingMsg = 'Error\nThe following features required to run Godot projects on the Web are missing:\n'; displayFailureNotice(missingMsg + missing.join('\n')); diff --git a/misc/dist/html/service-worker.js b/misc/dist/html/service-worker.js index 310574f21d..70e7a399e1 100644 --- a/misc/dist/html/service-worker.js +++ b/misc/dist/html/service-worker.js @@ -3,14 +3,14 @@ // that they need an Internet connection to run the project if desired. // Incrementing CACHE_VERSION will kick off the install event and force // previously cached resources to be updated from the network. -const CACHE_VERSION = "@GODOT_VERSION@"; -const CACHE_PREFIX = "@GODOT_NAME@-sw-cache-"; +const CACHE_VERSION = "___GODOT_VERSION___"; +const CACHE_PREFIX = "___GODOT_NAME___-sw-cache-"; const CACHE_NAME = CACHE_PREFIX + CACHE_VERSION; -const OFFLINE_URL = "@GODOT_OFFLINE_PAGE@"; +const OFFLINE_URL = "___GODOT_OFFLINE_PAGE___"; // Files that will be cached on load. -const CACHED_FILES = @GODOT_CACHE@; +const CACHED_FILES = ___GODOT_CACHE___; // Files that we might not want the user to preload, and will only be cached on first load. -const CACHABLE_FILES = @GODOT_OPT_CACHE@; +const CACHABLE_FILES = ___GODOT_OPT_CACHE___; const FULL_CACHE = CACHED_FILES.concat(CACHABLE_FILES); self.addEventListener("install", (event) => { @@ -22,7 +22,7 @@ self.addEventListener("activate", (event) => { function (keys) { // Remove old caches. return Promise.all(keys.filter(key => key.startsWith(CACHE_PREFIX) && key != CACHE_NAME).map(key => caches.delete(key))); - }).then(function() { + }).then(function () { // Enable navigation preload if available. return ("navigationPreload" in self.registration) ? self.registration.navigationPreload.enable() : Promise.resolve(); }) |