This commit is contained in:
retoor 2025-05-19 01:35:34 +02:00
parent 2e837f96c5
commit 59a815f85a

View File

@ -39,7 +39,7 @@ function glowCSSVariable(varName, glowColor, duration = 500) {
const root = document.documentElement; const root = document.documentElement;
//igetComputedStyle(root).getPropertyValue(varName).trim(); //igetComputedStyle(root).getPropertyValue(varName).trim();
glowColor = lightenColor(glowColor, 80); glowColor = lightenColor(glowColor, 10);
root.style.setProperty(varName, glowColor); root.style.setProperty(varName, glowColor);
setTimeout(() => { setTimeout(() => {
root.style.setProperty(varName, originalColor); root.style.setProperty(varName, originalColor);
@ -49,12 +49,12 @@ function glowCSSVariable(varName, glowColor, duration = 500) {
function updateStarColorDelayed(color) { function updateStarColorDelayed(color) {
glowCSSVariable('--star-color', color, 2500); glowCSSVariable('--star-color', color, 2500);
} }
app.updateStarColor = updateStarColorDelayed;
app.ws.addEventListener("set_typing", (data) => { app.ws.addEventListener("set_typing", (data) => {
updateStarColorDelayed(data.data.color); updateStarColorDelayed(data.data.color);
}); });
/*
class StarField { class StarField {
constructor(container = document.body, options = {}) { constructor(container = document.body, options = {}) {
this.container = container; this.container = container;
@ -111,5 +111,5 @@ const starField = new StarField(document.body, {
speed: 5, speed: 5,
color: "white" color: "white"
}); });
*/
</script> </script>