From e2cdd07f6efb31546e3f7c3e7eb17a8429639e38 Mon Sep 17 00:00:00 2001 From: Erich Loftis Date: Fri, 1 Dec 2023 15:52:06 -0600 Subject: [PATCH] Update InitCommon.js --- js/InitCommon.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/InitCommon.js b/js/InitCommon.js index 65a0db79..65ac757f 100644 --- a/js/InitCommon.js +++ b/js/InitCommon.js @@ -45,6 +45,7 @@ let cameraRecentlyMoving = false; let isPaused = true; let oldYawRotation, oldPitchRotation; let mobileJoystickControls = null; +let mobileShowButtons = true; let mobileUseDarkButtons = false; let oldDeltaX = 0; let oldDeltaY = 0; @@ -192,7 +193,7 @@ function onWindowResize(event) pathTracingUniforms.uVLen.value = Math.tan(fovScale); pathTracingUniforms.uULen.value = pathTracingUniforms.uVLen.value * worldCamera.aspect; - if (!mouseControl) + if (!mouseControl && mobileShowButtons) { button1Element.style.display = ""; button2Element.style.display = ""; @@ -481,6 +482,7 @@ function initTHREEjs() { mobileJoystickControls = new MobileJoystickControls({ //showJoystick: true, + showButtons: mobileShowButtons, useDarkButtons: mobileUseDarkButtons }); }