commit pa borrar lo del slowdown

This commit is contained in:
2025-07-27 19:51:02 +02:00
parent 5dc46dda5a
commit bb2d6e5d0b
5 changed files with 158 additions and 6 deletions

View File

@@ -262,6 +262,33 @@ auto easeOutElastic(double time) -> double {
return pow(2, -10 * time) * sin((time * 10 - 0.75) * C4) + 1;
}
// Ease Out Expo - Muy suave al final (más dramático)
auto easeOutExpo(double time) -> double {
return time == 1.0f ? 1.0f : 1.0f - pow(2.0f, -10.0f * time);
}
// Ease In Expo - Arranque muy gradual
auto easeInExpo(double time) -> double {
return time == 0.0f ? 0.0f : pow(2.0f, 10.0f * (time - 1.0f));
}
// Ease Out Back - Con un pequeño "rebote"
auto easeOutBack(double time) -> double {
const double C1 = 1.70158f;
const double C3 = C1 + 1.0f;
return 1.0f + C3 * pow(time - 1.0f, 3.0f) + C1 * pow(time - 1.0f, 2.0f);
}
// Ease Out Cubic - Desaceleración suave al final
auto easeOutCubic(double time) -> double {
return 1.0f - pow(1.0f - time, 3.0f);
}
// Ease In Cubic - Aceleración gradual
auto easeInCubic(double time) -> double {
return time * time * time;
}
// Comprueba si una vector contiene una cadena
auto stringInVector(const std::vector<std::string> &vec, const std::string &str) -> bool {
return std::find(vec.begin(), vec.end(), str) != vec.end();