Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
34 lines
1 KiB
TypeScript
34 lines
1 KiB
TypeScript
// Module ID: 11131
|
|
// Function ID: 11132
|
|
// Name: AnimationUtils
|
|
// Dependencies: [2]
|
|
// Exports: getOrbBalanceCounterAnimationConfigs
|
|
|
|
// Module 11131 (AnimationUtils)
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const ORB_LOTTIE_COUNTER_ANIMATION_FACTORS = { EARN: 0.25, SPEND: 0.3 };
|
|
let result = size.fileFinishedImporting("modules/virtual_currency/shared/AnimationUtils.tsx");
|
|
|
|
export const EXPECTED_ORB_LOTTIE_ANIMATION_DURATION_MS = 3000;
|
|
export { ORB_LOTTIE_COUNTER_ANIMATION_FACTORS };
|
|
export const getOrbBalanceCounterAnimationConfigs = function getOrbBalanceCounterAnimationConfigs(diff, targetTime) {
|
|
targetTime = targetTime.targetTime;
|
|
if (targetTime.isRenderedWithoutLottieAnimation) {
|
|
const obj2 = { duration: targetTime, delay: 0 };
|
|
return obj2;
|
|
} else {
|
|
let str = "SPEND";
|
|
if (diff > 0) {
|
|
str = "EARN";
|
|
}
|
|
const result = targetTime * obj[str];
|
|
obj = { duration: result, delay: null };
|
|
let num2 = 0;
|
|
if (diff > 0) {
|
|
num2 = targetTime - result;
|
|
}
|
|
obj.delay = num2;
|
|
return obj;
|
|
}
|
|
};
|