mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-03 04:19:06 +08:00
updated hyper and animation speed thresholds
This commit is contained in:
parent
e1027ddc70
commit
46832316d8
1 changed files with 3 additions and 3 deletions
|
@ -63,10 +63,10 @@ function update(): void {
|
|||
|
||||
export function updateFastOpacity(num: number): void {
|
||||
if (!Config.monkey) return;
|
||||
const opacity = mapRange(num, 100, 200, 0, 1);
|
||||
const opacity = mapRange(num, 130, 180, 0, 1);
|
||||
$("#monkey .fast").animate({ opacity: opacity }, 1000);
|
||||
let animDuration = mapRange(num, 100, 200, 0.5, 0.01);
|
||||
if (animDuration == 0.5) animDuration = 0;
|
||||
let animDuration = mapRange(num, 130, 180, 0.25, 0.01);
|
||||
if (animDuration == 0.25) animDuration = 0;
|
||||
$("#monkey").css({ animationDuration: animDuration + "s" });
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue