Implemented transformations

This commit is contained in:
Lorenzo Torres 2025-08-06 15:32:32 +02:00
parent 00d51fc970
commit 6b948f6718
6 changed files with 250 additions and 30 deletions

View file

@ -18,7 +18,7 @@ up: @Vector(3, f32) = .{ 0.0, 1.0, 0.0 },
speed: f32 = 2.5,
pub fn getProjection(width: usize, height: usize) math.Matrix {
return math.Matrix.perspective(math.rad(45.0), (@as(f32, @floatFromInt(width)) / @as(f32, @floatFromInt(height))), 0.1, 100.0);
return math.Matrix.perspective(math.rad(40.0), (@as(f32, @floatFromInt(width)) / @as(f32, @floatFromInt(height))), 0.1, 100.0);
}
pub fn getView(self: Camera) math.Matrix {