From 3ab48eb3e2d0c960ca71caabca62a824ab2772cf Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 26 May 2025 05:30:14 +0200 Subject: [PATCH] Adjust probability of joy animation salto --- animeCat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/animeCat.js b/animeCat.js index a12df6b..8781003 100644 --- a/animeCat.js +++ b/animeCat.js @@ -308,7 +308,7 @@ _runJoyAnimation(onFinish) { img.src = this.images.joy || this.images.default; - const salto = Math.random() < 1; + const salto = Math.random() < 0.2; const upTime = 600; const hangTime = salto ? 500 : 1800; const downTime = 800; @@ -390,7 +390,7 @@ _runJoyAnimation(onFinish) { setTimeout(() => this._makeHeart(), Math.random() * 300); } } - + _makeHeart() { // Emoji oder eigenes Bild const emoji = Math.random() < 0.7 ? '❤️' : '💕';