feat: updated engine version to 4.4-rc1

This commit is contained in:
Sara 2025-02-23 14:38:14 +01:00
parent ee00efde1f
commit 21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions

View file

@ -38,7 +38,7 @@ body {
}
#status {
background-color: #242424;
background-color: $GODOT_SPLASH_COLOR;
display: flex;
flex-direction: column;
justify-content: center;
@ -52,6 +52,20 @@ body {
margin: auto;
}
#status-splash.show-image--false {
display: none;
}
#status-splash.fullsize--true {
height: 100%;
width: 100%;
object-fit: contain;
}
#status-splash.use-filter--false {
image-rendering: pixelated;
}
#status-progress, #status-notice {
display: none;
}
@ -88,7 +102,7 @@ body {
</noscript>
<div id="status">
<img id="status-splash" src="$GODOT_SPLASH" alt="">
<img id="status-splash" class="$GODOT_SPLASH_CLASSES" src="$GODOT_SPLASH" alt="">
<progress id="status-progress"></progress>
<div id="status-notice"></div>
</div>
@ -140,7 +154,7 @@ const engine = new Engine(GODOT_CONFIG);
} else if (typeof err === 'string') {
setStatusNotice(err);
} else {
setStatusNotice('An unknown error occured');
setStatusNotice('An unknown error occurred.');
}
setStatusMode('notice');
initializing = false;
@ -152,9 +166,15 @@ const engine = new Engine(GODOT_CONFIG);
if (missing.length !== 0) {
if (GODOT_CONFIG['serviceWorker'] && GODOT_CONFIG['ensureCrossOriginIsolationHeaders'] && 'serviceWorker' in navigator) {
let serviceWorkerRegistrationPromise;
try {
serviceWorkerRegistrationPromise = navigator.serviceWorker.getRegistration();
} catch (err) {
serviceWorkerRegistrationPromise = Promise.reject(new Error('Service worker registration failed.'));
}
// There's a chance that installing the service worker would fix the issue
Promise.race([
navigator.serviceWorker.getRegistration().then((registration) => {
serviceWorkerRegistrationPromise.then((registration) => {
if (registration != null) {
return Promise.reject(new Error('Service worker already exists.'));
}
@ -164,10 +184,11 @@ const engine = new Engine(GODOT_CONFIG);
new Promise((resolve) => {
setTimeout(() => resolve(), 2000);
}),
]).catch((err) => {
console.error('Error while registering service worker:', err);
}).then(() => {
]).then(() => {
// Reload if there was no error.
window.location.reload();
}).catch((err) => {
console.error('Error while registering service worker:', err);
});
} else {
// Display the message as usual