1
0

Add glow effect to animeCat.js

This commit is contained in:
2025-05-26 07:00:18 +02:00
parent 80cdf0384b
commit 1ffb6ec748

View File

@@ -49,6 +49,16 @@ window.AnimeCat = class AnimeCat {
zIndex: '1'
});
// --- Glow ---
if (!this.wrapper.querySelector('#cat-glow')) {
this.glow = document.createElement('div');
this.glow.id = 'cat-glow';
this.wrapper.appendChild(this.glow);
}
this.img = document.createElement('img');
this.img.src = this.images.default;
// --- Cat image ---
this.img = document.createElement('img');
this.img.src = this.images.default;
@@ -131,7 +141,7 @@ window.AnimeCat = class AnimeCat {
// Zeigt Progress der täglichen Commits an
_animateCatGlow(commitCount) {
const glow = this.slot.querySelector('#cat-glow');
this.glow = this.wrapper.querySelector('#cat-glow');
if (!glow) return;
const factor = Math.min(commitCount / 10, 1);