1
0

Add glow wobble animation to AnimeCat

This commit is contained in:
2025-05-26 07:54:17 +02:00
parent 0ca02f01b8
commit d98bf4d13a

View File

@@ -30,6 +30,7 @@ window.AnimeCat = class AnimeCat {
this._createElements(); this._createElements();
this._bindMouseHold(); this._bindMouseHold();
this._startBlinking(); this._startBlinking();
this.startGlowWobble();
} }
_createElements() { _createElements() {
@@ -158,7 +159,7 @@ window.AnimeCat = class AnimeCat {
} }
startGlowWobble() { _startGlowWobble() {
let t = 0; let t = 0;
const loop = () => { const loop = () => {
// z.B. sanft die Opazität und evtl. blur modifizieren // z.B. sanft die Opazität und evtl. blur modifizieren
@@ -173,7 +174,6 @@ window.AnimeCat = class AnimeCat {
stopGlowWobble() { stopGlowWobble() {
if (this._glowWobbleId) cancelAnimationFrame(this._glowWobbleId); if (this._glowWobbleId) cancelAnimationFrame(this._glowWobbleId);
} }
this.startGlowWobble();
// Hilfsfunktionen zur Farbinterpolation // Hilfsfunktionen zur Farbinterpolation
_lerp(a, b, t) { return a + (b - a) * t; } _lerp(a, b, t) { return a + (b - a) * t; }