This commit is contained in:
Kyle
2020-07-24 17:22:34 -07:00
parent 2b9e17ea0c
commit b40048d247
7 changed files with 16 additions and 18 deletions

View File

@@ -8,6 +8,14 @@ rootStyles.setProperty('--font-color', '#000000')
rootStyles.setProperty('--body-background', 'none') rootStyles.setProperty('--body-background', 'none')
setCookie('colorPalette', 'dayRave') setCookie('colorPalette', 'dayRave')
//Stops the hue shift when another palette is loaded
document.getElementById('inputColorPalette').addEventListener('change', removeEventListener, false)
function removeEventListener() {
clearInterval(colorCycle)
document.getElementById('inputColorPalette').removeEventListener('change', removeEventListener, false)
}
//Shifts the hue //Shifts the hue
var colorCycle = setInterval(shiftHue, 100) var colorCycle = setInterval(shiftHue, 100)
var currentHueRotation = 0 var currentHueRotation = 0
@@ -18,13 +26,4 @@ function shiftHue() {
if (currentHueRotation == 360) { if (currentHueRotation == 360) {
currentHueRotation = 0 currentHueRotation = 0
} }
}
//Stops the hue shift when another palette is loaded
document.getElementById('inputColorPalette').addEventListener('change', removeEventListener, false)
function removeEventListener() {
console.log('cleared')
clearInterval(colorCycle)
document.getElementById('inputColorPalette').removeEventListener('change', removeEventListener, false)
} }

View File

@@ -8,6 +8,14 @@ rootStyles.setProperty('--font-color', '#efefef')
rootStyles.setProperty('--body-background', 'none') rootStyles.setProperty('--body-background', 'none')
setCookie('colorPalette', 'nightRave') setCookie('colorPalette', 'nightRave')
//Stops the hue shift when another palette is loaded
document.getElementById('inputColorPalette').addEventListener('change', removeEventListener, false)
function removeEventListener() {
clearInterval(colorCycle)
document.getElementById('inputColorPalette').removeEventListener('change', removeEventListener, false)
}
//Shifts the hue //Shifts the hue
var colorCycle = setInterval(shiftHue, 100) var colorCycle = setInterval(shiftHue, 100)
var currentHueRotation = 0 var currentHueRotation = 0
@@ -18,13 +26,4 @@ function shiftHue() {
if (currentHueRotation == 360) { if (currentHueRotation == 360) {
currentHueRotation = 0 currentHueRotation = 0
} }
}
//Stops the hue shift when another palette is loaded
document.getElementById('inputColorPalette').addEventListener('change', removeEventListener, false)
function removeEventListener() {
console.log('cleared')
clearInterval(colorCycle)
document.getElementById('inputColorPalette').removeEventListener('change', removeEventListener, false)
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 700 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB