1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-29 16:16:38 +00:00

Upgrade to eslint 9

This commit is contained in:
patwork
2024-05-12 04:16:02 +02:00
parent 8e2141eac5
commit 1a89ae70eb
16 changed files with 917 additions and 1604 deletions

View File

@@ -67,7 +67,8 @@ const GodotWebXR = {
GodotWebXR.orig_requestAnimationFrame = Browser.requestAnimationFrame;
}
Browser.requestAnimationFrame = enable
? GodotWebXR.requestAnimationFrame : GodotWebXR.orig_requestAnimationFrame;
? GodotWebXR.requestAnimationFrame
: GodotWebXR.orig_requestAnimationFrame;
},
pauseResumeMainLoop: () => {
// Once both GodotWebXR.session and GodotWebXR.space are set or
@@ -76,9 +77,9 @@ const GodotWebXR = {
// gets picked up automatically, however, in the Oculus Browser
// on the Quest, we need to pause and resume the main loop.
Browser.mainLoop.pause();
runtimeKeepalivePush(); // eslint-disable-line no-undef
runtimeKeepalivePush();
window.setTimeout(function () {
runtimeKeepalivePop(); // eslint-disable-line no-undef
runtimeKeepalivePop();
Browser.mainLoop.resume();
}, 0);
},
@@ -287,12 +288,12 @@ const GodotWebXR = {
// Store onsimpleevent so we can use it later.
GodotWebXR.onsimpleevent = onsimpleevent;
const gl_context_handle = _emscripten_webgl_get_current_context(); // eslint-disable-line no-undef
const gl_context_handle = _emscripten_webgl_get_current_context();
const gl = GL.getContext(gl_context_handle).GLctx;
GodotWebXR.gl = gl;
gl.makeXRCompatible().then(function () {
GodotWebXR.gl_binding = new XRWebGLBinding(session, gl); // eslint-disable-line no-undef
GodotWebXR.gl_binding = new XRWebGLBinding(session, gl);
// This will trigger the layer to get created.
GodotWebXR.getLayer();