From b815f093b628d887865d18c20e495cdb4eea1db0 Mon Sep 17 00:00:00 2001 From: Jacob Williams <47766188+BotSpace@users.noreply.github.com> Date: Fri, 13 Dec 2024 22:30:02 -0500 Subject: [PATCH] window focus patch --- index.html | 1 + index.js | 11 +++++++++-- styles.css | 2 -- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index e93dc66..6dbf26d 100644 --- a/index.html +++ b/index.html @@ -45,6 +45,7 @@
+
Mobile Layout
diff --git a/index.js b/index.js index 27378f8..7dcdb39 100644 --- a/index.js +++ b/index.js @@ -158,9 +158,16 @@ function renderLoop() { } } - if (!document.hasFocus()) { rawPacket.fill(0, 0, 20); } + if (!document.hasFocus()) { + rawPacket.fill(0, 0, 20); + rawPacket[0] = 1; + rawPacket[1] = 127; + rawPacket[2] = 127; + rawPacket[3] = 127; + rawPacket[4] = 127; + } - //console.log(rawPacket) + console.log(rawPacket) bleAgent.attemptSend(rawPacket); } diff --git a/styles.css b/styles.css index 8079ba2..bdccedf 100644 --- a/styles.css +++ b/styles.css @@ -51,7 +51,6 @@ body { } #info-container { - display: none; box-sizing: border-box; background: grey; width: 84vw; @@ -84,7 +83,6 @@ body { #desktop-button { width: 30vw; height: 30vw; - display: none; } #mobile-joystick {