decord/source/modules/messages/BurstReactionEffectUtils.tsx
github-actions cd74c1f217 chore: update source for alpha 345.5
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9667_m.js (378 MB)
2026-09-05 10:56:28 +00:00

36 lines
1.4 KiB
TypeScript

// Module ID: 7822
// Function ID: 7823
// Name: replaceAnimationColors
// Dependencies: [4409, 12, 2]
// Exports: replaceAnimationColors
// Module 7822 (replaceAnimationColors)
import set from "set" /* 2 */;
import hexToRgba from "hexToRgba" /* 4409 */;
import apply from "apply" /* 12 */;
const memoizeResult = apply.memoize((str) => {
let length;
let num = 0;
let num2 = 0;
let num3 = 0;
if (0 < str.length) {
do {
num2 = (num2 << 5) - num2 + str.charCodeAt(num);
num = num + 1;
num3 = num2;
length = str.length;
} while (num < length);
}
return Math.abs(num3);
});
const result = set.fileFinishedImporting("modules/messages/BurstReactionEffectUtils.tsx");
export const replaceAnimationColors = function replaceAnimationColors(c5, arg1) {
const items = [, , ];
({ r: arr[0], g: arr[1], b: arr[2] } = arg1);
const complimentaryPaletteForColor = hexToRgba.getComplimentaryPaletteForColor(items, 2);
const obj = hexToRgba;
return c5.replace(/(\[1,0,0,)/g, "[" + complimentaryPaletteForColor[0][0] / 255 + "," + complimentaryPaletteForColor[0][1] / 255 + "," + complimentaryPaletteForColor[0][2] / 255 + ",").replace(/\[0,0,1,/g, "[" + complimentaryPaletteForColor[1][0] / 255 + "," + complimentaryPaletteForColor[1][1] / 255 + "," + complimentaryPaletteForColor[1][2] / 255 + ",");
};
export const getBurstAnimationHash = memoizeResult;