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