You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Improve feature errors in HTML5 for easier understanding
This commit is contained in:
2
misc/dist/html/full-size.html
vendored
2
misc/dist/html/full-size.html
vendored
@@ -215,7 +215,7 @@ const engine = new Engine(GODOT_CONFIG);
|
|||||||
|
|
||||||
const missing = Engine.getMissingFeatures();
|
const missing = Engine.getMissingFeatures();
|
||||||
if (missing.length !== 0) {
|
if (missing.length !== 0) {
|
||||||
const missingMsg = 'Warning!\nThe following features required to run Godot projects on the Web are missing:\n';
|
const missingMsg = 'Error\nThe following features required to run Godot projects on the Web are missing:\n';
|
||||||
displayFailureNotice(missingMsg + missing.join('\n'));
|
displayFailureNotice(missingMsg + missing.join('\n'));
|
||||||
} else {
|
} else {
|
||||||
setStatusMode('indeterminate');
|
setStatusMode('indeterminate');
|
||||||
|
|||||||
@@ -76,19 +76,19 @@ const Features = { // eslint-disable-line no-unused-vars
|
|||||||
getMissingFeatures: function () {
|
getMissingFeatures: function () {
|
||||||
const missing = [];
|
const missing = [];
|
||||||
if (!Features.isWebGLAvailable(2)) {
|
if (!Features.isWebGLAvailable(2)) {
|
||||||
missing.push('WebGL2');
|
missing.push('WebGL2 - Check web browser configuration and hardware support');
|
||||||
}
|
}
|
||||||
if (!Features.isFetchAvailable()) {
|
if (!Features.isFetchAvailable()) {
|
||||||
missing.push('Fetch');
|
missing.push('Fetch - Check web browser version');
|
||||||
}
|
}
|
||||||
if (!Features.isSecureContext()) {
|
if (!Features.isSecureContext()) {
|
||||||
missing.push('Secure Context');
|
missing.push('Secure Context - Check web server configuration (use HTTPS)');
|
||||||
}
|
}
|
||||||
if (!Features.isCrossOriginIsolated()) {
|
if (!Features.isCrossOriginIsolated()) {
|
||||||
missing.push('Cross Origin Isolation');
|
missing.push('Cross Origin Isolation - Check web server configuration (send correct headers)');
|
||||||
}
|
}
|
||||||
if (!Features.isSharedArrayBufferAvailable()) {
|
if (!Features.isSharedArrayBufferAvailable()) {
|
||||||
missing.push('SharedArrayBuffer');
|
missing.push('SharedArrayBuffer - Check web server configuration (send correct headers)');
|
||||||
}
|
}
|
||||||
// Audio is normally optional since we have a dummy fallback.
|
// Audio is normally optional since we have a dummy fallback.
|
||||||
return missing;
|
return missing;
|
||||||
|
|||||||
Reference in New Issue
Block a user