decord/source/modules/messages/BurstReactionEffectUtils.tsx

35 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-07-23 10:11:24 +00:00
// Module ID: 7064
// Function ID: 56499
2026-07-20 16:05:17 +00:00
// Name: replaceAnimationColors
2026-07-23 10:11:24 +00:00
// Dependencies: [3974, 22, 2]
2026-07-20 16:05:17 +00:00
// Exports: replaceAnimationColors
2026-07-23 10:11:24 +00:00
// Module 7064 (replaceAnimationColors)
import apply from "apply";
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const memoizeResult = apply.memoize((str) => {
2026-07-20 16:05:17 +00:00
let length;
let num = 0;
let num2 = 0;
let num3 = 0;
if (0 < str.length) {
do {
num2 = (num2 << 5) - num2 + str.charCodeAt(num3);
num3 = num3 + 1;
num = num2;
length = str.length;
} while (num3 < length);
}
return Math.abs(num);
});
2026-07-23 10:11:24 +00:00
const result = require("set").fileFinishedImporting("modules/messages/BurstReactionEffectUtils.tsx");
export const replaceAnimationColors = function replaceAnimationColors(json, arg1) {
const items = [, , ];
({ r: arr[0], g: arr[1], b: arr[2] } = arg1);
const complimentaryPaletteForColor = require(3974) /* hexToRgb */.getComplimentaryPaletteForColor(items, 2);
const obj = require(3974) /* hexToRgb */;
return json.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;