decord/source/modules/poggermode/PoggermodeUtils.tsx

125 lines
3.6 KiB
TypeScript
Raw Normal View History

2026-09-03 10:05:34 +00:00
// Module ID: 7587
// Function ID: 7588
2026-07-29 08:29:29 +00:00
// Name: getComboShakeIntensity
2026-09-03 10:05:34 +00:00
// Dependencies: [7434, 708, 2]
2026-07-20 16:05:17 +00:00
// Exports: getComboPercentage, getComboScore, getComboShakeIntensity, getComboStyles
2026-09-03 10:05:34 +00:00
// Module 7587 (getComboShakeIntensity)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
2026-09-02 09:53:35 +00:00
import unsafe_getRawColor from "unsafe_getRawColor" /* 708 */;
2026-09-03 10:05:34 +00:00
import ConfettiLocation from "ConfettiLocation" /* 7434 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
({ ShakeLevel: obj1, SHAKE_STEPS: c3, SHAKE_STEP_DIVIDER: c4 } = ConfettiLocation);
2026-07-23 10:11:24 +00:00
let items = [[1, 0.001], [25, 0.3], [100, 0.5], [250, 0.8], [500, 0.9], [2500, 0.95], [9001, 1]];
2026-07-20 16:05:17 +00:00
let closure_5 = items.map((arg0) => {
[tmp] = arg0;
return tmp;
});
let closure_6 = items.map((arg0) => {
[, tmp] = arg0;
return tmp;
});
2026-08-24 06:08:38 +00:00
let result = set.fileFinishedImporting("modules/poggermode/PoggermodeUtils.tsx");
2026-07-20 16:05:17 +00:00
export const getComboShakeIntensity = function getComboShakeIntensity(userCombo, LEVEL_4) {
let LEVEL_3 = LEVEL_4;
if (LEVEL_4 === undefined) {
LEVEL_3 = LEVEL_3.LEVEL_3;
}
2026-07-23 10:11:24 +00:00
const items = [table[LEVEL_3], table2[LEVEL_3]];
2026-08-24 06:08:38 +00:00
c0 = undefined;
c1 = undefined;
2026-07-29 08:29:29 +00:00
[arr2, ] = items;
LEVEL_3 = undefined;
const result = userCombo.value * userCombo.multiplier;
LEVEL_3 = result;
let num = 0;
if (result > 0) {
const _Math = Math;
num = Math.min(100000, arr2.reduce((arg0, arg1, arg2) => {
if (c2 > arg1) {
if (arg2 + 1 === length.length) {
return tmp4[arg2];
} else {
return (tmp - arg1) / (tmp6[arg2 + 1] - arg1) * (tmp4[arg2 + 1] - tmp5) + tmp5;
}
} else {
let tmp2 = arg0;
if (tmp === arg1) {
tmp2 = dependencyMap[arg2];
}
return tmp2;
}
}, 0));
}
return num;
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
export const getComboPercentage = function getComboPercentage(value) {
2026-07-20 16:05:17 +00:00
const items = [closure_5, closure_6];
2026-07-29 08:29:29 +00:00
[arr2, ] = items;
2026-08-24 06:08:38 +00:00
c2 = undefined;
2026-07-29 08:29:29 +00:00
const result = value.value * value.multiplier;
c2 = result;
let num = 0;
if (result > 0) {
const _Math = Math;
num = Math.min(1, arr2.reduce((arg0, arg1, arg2) => {
if (c2 > arg1) {
if (arg2 + 1 === length.length) {
return tmp4[arg2];
} else {
return (tmp - arg1) / (tmp6[arg2 + 1] - arg1) * (tmp4[arg2 + 1] - tmp5) + tmp5;
}
} else {
let tmp2 = arg0;
if (tmp === arg1) {
tmp2 = dependencyMap[arg2];
}
return tmp2;
}
}, 0));
}
return num;
2026-07-20 16:05:17 +00:00
};
export const getComboStyles = function getComboStyles(arg0) {
if (1 === arg0) {
2026-07-29 08:29:29 +00:00
let obj = { color: null };
2026-08-24 06:08:38 +00:00
obj[0] = unsafe_getRawColor.unsafe_getRawColor("BRAND_500");
const obj10 = unsafe_getRawColor;
2026-07-20 16:05:17 +00:00
} else {
if (2 !== arg0) {
if (3 !== arg0) {
if (4 !== arg0) {
if (5 !== arg0) {
if (6 === arg0) {
2026-07-29 08:29:29 +00:00
obj = { color: null, square: true };
2026-08-24 06:08:38 +00:00
obj[0] = unsafe_getRawColor.unsafe_getRawColor("RED_400");
const obj4 = unsafe_getRawColor;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
obj = { color: null, flair: true };
2026-08-24 06:08:38 +00:00
obj1 = unsafe_getRawColor;
2026-07-29 08:29:29 +00:00
obj[0] = obj1.unsafe_getRawColor("ORANGE_345");
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-29 08:29:29 +00:00
obj1 = { color: null, square: true };
2026-08-24 06:08:38 +00:00
obj1[0] = unsafe_getRawColor.unsafe_getRawColor("YELLOW_300");
2026-07-20 16:05:17 +00:00
obj = obj1;
2026-08-24 06:08:38 +00:00
const obj6 = unsafe_getRawColor;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
const obj2 = { color: null };
2026-08-24 06:08:38 +00:00
obj2[0] = unsafe_getRawColor.unsafe_getRawColor("GREEN_360");
2026-07-20 16:05:17 +00:00
obj = obj2;
2026-08-24 06:08:38 +00:00
const obj8 = unsafe_getRawColor;
2026-07-20 16:05:17 +00:00
}
return obj;
};
2026-07-29 08:29:29 +00:00
export const getComboScore = function getComboScore(multiplier) {
let num = multiplier.multiplier;
if (num == null) {
num = 1;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return multiplier.value * num;
2026-07-20 16:05:17 +00:00
};