animacions a renderinfo

This commit is contained in:
2026-04-05 01:03:48 +02:00
parent 91f88ded09
commit 4238ae1bc4
9 changed files with 181 additions and 32 deletions

22
source/utils/easing.hpp Normal file
View File

@@ -0,0 +1,22 @@
#pragma once
// Funcions de suavitzat per animacions. Totes accepten t en el rang [0, 1]
// i retornen un valor en [0, 1] (amb overshoot possible en algunes variants).
namespace Easing {
auto linear(float t) -> float;
// Quadratic
auto outQuad(float t) -> float;
auto inQuad(float t) -> float;
auto inOutQuad(float t) -> float;
// Cubic
auto outCubic(float t) -> float;
auto inCubic(float t) -> float;
// Interpolacions (aplicar després d'un easing al paràmetre t)
auto lerp(float a, float b, float t) -> float;
auto lerpInt(int a, int b, float t) -> int;
} // namespace Easing