aboutsummaryrefslogtreecommitdiff
path: root/platform/javascript/godot_shell.html
diff options
context:
space:
mode:
authorRémi Verschelde2017-02-02 08:18:42 +0100
committerGitHub2017-02-02 08:18:42 +0100
commit40e4c1f6abbe5569a3c2f91d48b9770c8e97ea0d (patch)
tree12ba447a51df6e9a21d34df6ffdca8b1595e3f96 /platform/javascript/godot_shell.html
parent869d710198af9eb3dfee3e167cb432389d04f76d (diff)
parente06edc67c049c65c3952a8447e22717a0f492020 (diff)
downloadgodot-40e4c1f6abbe5569a3c2f91d48b9770c8e97ea0d.tar.gz
godot-40e4c1f6abbe5569a3c2f91d48b9770c8e97ea0d.tar.zst
godot-40e4c1f6abbe5569a3c2f91d48b9770c8e97ea0d.zip
Merge pull request #7689 from eska014/webgl2
Enable WebGL2 in web export, start fixing build
Diffstat (limited to 'platform/javascript/godot_shell.html')
-rw-r--r--platform/javascript/godot_shell.html16
1 files changed, 8 insertions, 8 deletions
diff --git a/platform/javascript/godot_shell.html b/platform/javascript/godot_shell.html
index a8b959493..65f3b4a34 100644
--- a/platform/javascript/godot_shell.html
+++ b/platform/javascript/godot_shell.html
@@ -277,10 +277,10 @@ $GODOT_STYLE_INCLUDE
statusElement.appendChild(closeNote);
Presentation.setStatusVisible(true);
},
- isWebGLAvailable: function isWebGLAvailable() {
+ isWebGL2Available: function isWebGL2Available() {
var context;
try {
- context = canvasElement.getContext("webgl") || canvasElement.getContext("experimental-webgl");
+ context = canvasElement.getContext("webgl2") || canvasElement.getContext("experimental-webgl2");
} catch (e) {}
return !!context;
},
@@ -319,12 +319,12 @@ $GODOT_STYLE_INCLUDE
outputElement.firstChild.remove();
}
var msg = document.createElement("div");
- if (text.trim().startsWith("**ERROR**")
- || text.startsWith("**EXCEPTION**")) {
+ if (String.prototype.trim.call(text).startsWith("**ERROR**")
+ || String.prototype.trim.call(text).startsWith("**EXCEPTION**")) {
msg.style.color = "#d44";
- } else if (text.trim().startsWith("**WARNING**")) {
+ } else if (String.prototype.trim.call(text).startsWith("**WARNING**")) {
msg.style.color = "#ccc000";
- } else if (text.trim().startsWith("**SCRIPT ERROR**")) {
+ } else if (String.prototype.trim.call(text).startsWith("**SCRIPT ERROR**")) {
msg.style.color = "#c6d";
}
msg.textContent = text;
@@ -395,8 +395,8 @@ $GODOT_STYLE_INCLUDE
}
};
- if (!Presentation.isWebGLAvailable()) {
- Presentation.setStatus("WebGL appears to be unsupported in the current browser.\nPlease try updating or use a different browser.");
+ if (!Presentation.isWebGL2Available()) {
+ Presentation.setStatus("WebGL2 appears to be unsupported in the current browser.\nPlease try updating or use a different browser.");
Presentation.preventLoading = true;
} else {
Presentation.setStatus("Downloading...");