Update.
This commit is contained in:
parent
2e837f96c5
commit
59a815f85a
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user