decord/source/modules/virtual_currency/shared/AnimationUtils.tsx
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

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;
}
};