Adjust probability of joy animation salto
This commit is contained in:
@@ -308,7 +308,7 @@ _runJoyAnimation(onFinish) {
|
|||||||
|
|
||||||
img.src = this.images.joy || this.images.default;
|
img.src = this.images.joy || this.images.default;
|
||||||
|
|
||||||
const salto = Math.random() < 1;
|
const salto = Math.random() < 0.2;
|
||||||
const upTime = 600;
|
const upTime = 600;
|
||||||
const hangTime = salto ? 500 : 1800;
|
const hangTime = salto ? 500 : 1800;
|
||||||
const downTime = 800;
|
const downTime = 800;
|
||||||
@@ -390,7 +390,7 @@ _runJoyAnimation(onFinish) {
|
|||||||
setTimeout(() => this._makeHeart(), Math.random() * 300);
|
setTimeout(() => this._makeHeart(), Math.random() * 300);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_makeHeart() {
|
_makeHeart() {
|
||||||
// Emoji oder eigenes Bild
|
// Emoji oder eigenes Bild
|
||||||
const emoji = Math.random() < 0.7 ? '❤️' : '💕';
|
const emoji = Math.random() < 0.7 ? '❤️' : '💕';
|
||||||
|
|||||||
Reference in New Issue
Block a user