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ZJObfE,cYkyHG1xb4Q,pK3U2ntSlzI,bBwNfsinmgo,Nu4HtrSJDcQ,gCHpK7fPqjU,yIIbm0-QJmU,jp1bKCtEbmA,GTX5uFgO2RE,bTlkgNDRTYs,wCG_LkQ2a1w,0l0LH_H1vXs,yzAwwERuqr4,A_20HcvDD_0,0F-5a11IZrc,uITMKgNymYU,PAApaKMbmoc,Dnq2Ujw_LCY,bxgT_AnuIs0,Dzwg9rZ_znk,Vx42TPAyJl4,7nhd2GwoBIU,tXXIciOWGJQ,4QAFDbJkJ_g,T9i4YWEG3ww,h0eS8T1fNPQ,tJIlom8LV0g,hSJKUpSNf8I,PZy0WiYs7VY,XIuZLuSsuPI,dEjzDsXa4d4,aozycLq5kw8
---->
Connect
diff --git a/js/background.js b/js/background.js
index 719690f..e74c190 100644
--- a/js/background.js
+++ b/js/background.js
@@ -2,7 +2,10 @@
if (detectMobile()) {
const box = document.getElementById("box");
const overlay = document.getElementById("overlay");
- let isWindowActive = true;
+ let isWindowActive = !document.hidden;
+ document.addEventListener('visibilitychange', () => {
+ isWindowActive = !document.hidden;
+ });
window.addEventListener('focus', () => isWindowActive = true);
window.addEventListener('blur', () => isWindowActive = false);
function getRandomHueIncrement() {
@@ -76,15 +79,19 @@ if (detectMobile()) {
}
}
}
- function updateColors() {
- if (isWindowActive) {
+ let lastUpdateTime = 0;
+ const updateInterval = 33;
+ function updateColors(timestamp) {
+ if (isWindowActive && timestamp - lastUpdateTime >= updateInterval) {
updateLayerState(boxState, false);
updateLayerState(overlayState, true);
setGradient(box, boxState);
setGradient(overlay, overlayState, true);
+ lastUpdateTime = timestamp;
}
+ requestAnimationFrame(updateColors);
}
setGradient(box, boxState);
setGradient(overlay, overlayState, true);
- setInterval(updateColors, 33);
+ requestAnimationFrame(updateColors);
}
diff --git a/js/color-change.js b/js/color-change.js
index 97814a3..978cb0a 100644
--- a/js/color-change.js
+++ b/js/color-change.js
@@ -3,7 +3,7 @@ if (detectMobile()) {
const hoverShift = document.querySelectorAll('button, a, a.dark-mode, footer, .article-nav-bottom, #site-nav a, .section-nav a');
const alwaysShift = document.querySelectorAll('header, #site-nav .col, .section-nav .col, .article-header, footer, .article-title, #site-title, #light-dark-zoom');
function getRandomDegree() {return Math.random() < 0.5 ? Math.floor(Math.random() * -270) - 45 : Math.floor(Math.random() * 270) + 46;}
-function getNewIntervalsTillNextChange() {return Math.floor(Math.random() * 22) + 11;}
+function getNewIntervalsTillNextChange() {return Math.floor(Math.random() * 11) + 7;}
function getRandomInterval() {return 111 + Math.floor(Math.random() * 1000);}
let isWindowActive = true;
window.addEventListener('focus', () => isWindowActive = true);
@@ -49,7 +49,7 @@ function startShift(element, interval, isHover = false) {
intervalCount = 0;
intervalsTillNextChange = getNewIntervalsTillNextChange();
}
- currentDegree += (targetDegree - currentDegree) * 0.001;
+ currentDegree += (targetDegree - currentDegree) * (0.005 + Math.random() * 0.005);
currentSaturation += (targetSaturation - currentSaturation) * 0.005;
currentContrast += (targetContrast - currentContrast) * 0.01;
currentBrightness += (targetBrightness - currentBrightness) * 0.01;