Files
discord-decomp/_bundle/ComplexAnimationBuilder.js
T
2026-11-01 12:12:55 +02:00

204 lines
5.2 KiB
JavaScript

// Metro module 1690 (f1691).
import _classCallCheck from "./_classCallCheck";
import _createClass from "./_createClass";
import _possibleConstructorReturn from "./_possibleConstructorReturn";
import _getPrototypeOf from "./_getPrototypeOf";
import _inherits from "./_inherits";
import { withSpring, withTiming } from "./Module1678";
import { BaseAnimationBuilder } from "./BaseAnimationBuilder";
let ComplexAnimationBuilder;
let env1332 = {};
env1332[5] = function _isNativeReflectConstruct() {
let c13163_0;
try {
c13163_0 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
} catch ($e) {}
const _isNativeReflectConstruct2 = function _isNativeReflectConstruct() {
return !!c13163_0;
};
env1332[5] = _isNativeReflectConstruct2;
return _isNativeReflectConstruct2();
};
ComplexAnimationBuilder = function ComplexAnimationBuilder() {
_classCallCheck(this, ComplexAnimationBuilder);
const r8 = _getPrototypeOf(ComplexAnimationBuilder);
return _possibleConstructorReturn(this, (0, env1332[5])() ? Reflect.construct(r8, arguments, _getPrototypeOf(this).constructor) : r8.apply(this, arguments));
};
_inherits(ComplexAnimationBuilder, BaseAnimationBuilder);
exports.ComplexAnimationBuilder = _createClass(ComplexAnimationBuilder, [{
key: "easing",
value: function easing(a0) {
this.easingV = a0;
return this;
}
}, {
key: "rotate",
value: function rotate(a0) {
this.rotateV = a0;
return this;
}
}, {
key: "springify",
value: function springify(a0) {
this.durationV = a0;
this.type = withSpring;
return this;
}
}, {
key: "dampingRatio",
value: function dampingRatio(a0) {
this.dampingRatioV = a0;
return this;
}
}, {
key: "damping",
value: function damping(a0) {
this.dampingV = a0;
return this;
}
}, {
key: "mass",
value: function mass(a0) {
this.massV = a0;
return this;
}
}, {
key: "stiffness",
value: function stiffness(a0) {
this.stiffnessV = a0;
return this;
}
}, {
key: "overshootClamping",
value: function overshootClamping(a0) {
this.overshootClampingV = a0;
return this;
}
}, {
key: "restDisplacementThreshold",
value: function restDisplacementThreshold(a0) {
this.restDisplacementThresholdV = a0;
return this;
}
}, {
key: "restSpeedThreshold",
value: function restSpeedThreshold(a0) {
this.restSpeedThresholdV = a0;
return this;
}
}, {
key: "withInitialValues",
value: function withInitialValues(a0) {
this.initialValues = a0;
return this;
}
}, {
key: "getAnimationAndConfig",
value: function getAnimationAndConfig() {
const durationV = this.durationV;
const easingV = this.easingV;
const rotateV = this.rotateV;
const r19 = this.type ? this.type : withTiming;
const dampingV = this.dampingV;
const dampingRatioV = this.dampingRatioV;
const massV = this.massV;
const stiffnessV = this.stiffnessV;
const overshootClampingV = this.overshootClampingV;
const restDisplacementThresholdV = this.restDisplacementThresholdV;
const restSpeedThresholdV = this.restSpeedThresholdV;
const r21 = {};
let c24548_0 = r21;
if (r19 === withTiming && easingV) {
r21.easing = easingV;
}
[{
variableName: "damping",
value: dampingV
}, {
variableName: "dampingRatio",
value: dampingRatioV
}, {
variableName: "mass",
value: massV
}, {
variableName: "stiffness",
value: stiffnessV
}, {
variableName: "overshootClamping",
value: overshootClampingV
}, {
variableName: "restDisplacementThreshold",
value: restDisplacementThresholdV
}, {
variableName: "restSpeedThreshold",
value: restSpeedThresholdV
}, {
variableName: "duration",
value: durationV
}, {
variableName: "rotate",
value: rotateV
}].forEach(({ value, variableName }) => {
if (value) {
c24548_0[variableName] = value;
}
});
return [r19, r21];
}
}], [{
key: "easing",
value: function easing(a0) {
return this.createInstance().easing(a0);
}
}, {
key: "rotate",
value: function rotate(a0) {
return this.createInstance().rotate(a0);
}
}, {
key: "springify",
value: function springify(a0) {
return this.createInstance().springify(a0);
}
}, {
key: "dampingRatio",
value: function dampingRatio(a0) {
return this.createInstance().dampingRatio(a0);
}
}, {
key: "damping",
value: function damping(a0) {
return this.createInstance().damping(a0);
}
}, {
key: "mass",
value: function mass(a0) {
return this.createInstance().mass(a0);
}
}, {
key: "stiffness",
value: function stiffness(a0) {
return this.createInstance().stiffness(a0);
}
}, {
key: "overshootClamping",
value: function overshootClamping(a0) {
return this.createInstance().overshootClamping(a0);
}
}, {
key: "restDisplacementThreshold",
value: function restDisplacementThreshold(a0) {
return this.createInstance().restDisplacementThreshold(a0);
}
}, {
key: "restSpeedThreshold",
value: function restSpeedThreshold(a0) {
return this.createInstance().restSpeedThreshold(a0);
}
}, {
key: "withInitialValues",
value: function withInitialValues(a0) {
return this.createInstance().withInitialValues(a0);
}
}]);