Files
discord-decomp/sources/by-id/module-00371.jsx
T
2026-07-27 16:20:00 +03:00

79 lines
3.0 KiB
React

/* Metro module 371; source: unknown; dependencies: [] */
function _fun5509(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#5509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:412:6, offset: 0x00cde034, size: 81 bytes, params: 8, frame: 16
const stiffnessFromOrigamiValue = function(a0) {
return 3.62 * (a0 - 30) + 194;
};
const dampingFromOrigamiValue = function(a0) {
return 3 * (a0 - 8) + 25;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
exports.fromOrigamiTensionAndFriction = function(a0, a1) {
var object = {};
object.stiffness = stiffnessFromOrigamiValue(a0);
object.damping = dampingFromOrigamiValue(a1);
return object;
};
exports.fromBouncinessAndSpeed = fromBouncinessAndSpeed;
}
function fromBouncinessAndSpeed(a0, a1) { // fn#5513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:412:391, offset: 0x00cde0eb, size: 161 bytes, params: 3, frame: 19
const closure = function(a0, a1, a2) {
return (a0 - 0) / (20 - 0);
};
const closure2 = function(a0, a1, a2) {
return a1 + a0 * (a2 - a1);
};
let value = closure(a0 / 1.7, 0, 20);
value = closure2(value, 0, 0.8);
const value3 = closure2(closure(a1 / 1.7, 0, 20), 0.5, 200);
value = ((a0, a1, a2) => {
var value = 2 * a0;
value -= a0 * a0;
return value * 0.01 + (1 - value) * a1;
})(value, b3Nobounce(value3), 0.01);
const object2 = {};
object2.stiffness = stiffnessFromOrigamiValue(value3);
object2.damping = dampingFromOrigamiValue(value);
return object2;
}
function b3Nobounce(a0) { // fn#5517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:412:744, owner: fromBouncinessAndSpeed.b3Nobounce, offset: 0x00cde1ed, size: 344 bytes, params: 2, frame: 15
var r0;
var Math;
var value;
if (a0 <= 18) {
Math = global.Math;
value = Math.pow(a0, 3);
value = 0.0007 * value;
Math = global.Math;
value = value - 0.031 * Math.pow(a0, 2) + 0.64 * a0 + 1.28;
r0 = value;
} else if (a0 > 18) {
if (a0 <= 44) {
Math = global.Math;
value = Math.pow(a0, 3);
value = 0.000044 * value;
Math = global.Math;
value = value - 0.006 * Math.pow(a0, 2) + 0.36 * a0 + 2;
r0 = value;
} else {
Math = global.Math;
value = Math.pow(a0, 3);
value = 0.00000045 * value;
Math = global.Math;
value = value - 0.000332 * Math.pow(a0, 2) + 0.1078 * a0 + 5.84;
r0 = value;
}
} else {
Math = global.Math;
value = Math.pow(a0, 3);
value = 0.00000045 * value;
Math = global.Math;
value = value - 0.000332 * Math.pow(a0, 2) + 0.1078 * a0 + 5.84;
r0 = value;
}
return r0;
}