This commit is contained in:
agra
2026-03-02 19:47:25 +02:00
parent 812bc6d6ec
commit e63c946116
33 changed files with 32185 additions and 202 deletions

View File

@@ -108,6 +108,15 @@ Color :: struct {
with_alpha :: (self: Color, a: u8) -> Color {
Color.{ r = self.r, g = self.g, b = self.b, a = a };
}
lerp :: (self: Color, b: Color, t: f32) -> Color {
Color.{
r = xx (self.r + (b.r - self.r) * t),
g = xx (self.g + (b.g - self.g) * t),
b = xx (self.b + (b.b - self.b) * t),
a = xx (self.a + (b.a - self.a) * t)
};
}
}
// Named color constants