Skip to content

Commit a27d0ae

Browse files
committed
fix plane and camera position
1 parent 2f312f3 commit a27d0ae

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/foundations/scenes/plane_distance/PlaneDistance.zig

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn init(allocator: std.mem.Allocator, cfg: *config) *PlaneDistance {
3030
cfg,
3131
pd,
3232
integrator,
33-
.{ 0, 200, -100 },
33+
.{ 5, 30, -30 },
3434
std.math.pi * 0.75,
3535
);
3636
errdefer cam.deinit(allocator);
@@ -104,14 +104,13 @@ pub fn updatePlaneTransform(self: *PlaneDistance, prog: u32) void {
104104
self.updatePlane(m);
105105
{
106106
var pm = m;
107-
pm = math.matrix.transformMatrix(pm, math.matrix.translate(100, 0, 200));
107+
pm = math.matrix.transformMatrix(pm, math.matrix.translate(10, 0, 20));
108108
pm = math.matrix.transformMatrix(pm, math.matrix.rotationZ(std.math.pi / 2.0));
109-
pm = math.matrix.transformMatrix(pm, math.matrix.uniformScale(10.0));
110109
for (self.pointer.programs()) |p| {
111110
rhi.setUniformMatrix(p, scenery.Pointer.pointer_uniform_name, pm);
112111
}
113112
}
114-
m = math.matrix.transformMatrix(m, math.matrix.scale(200.0, 0.01, 400.0));
113+
m = math.matrix.transformMatrix(m, math.matrix.scale(20.0, 0.01, 40.0));
115114
rhi.setUniformMatrix(prog, "f_plane_transform", m);
116115
}
117116

src/foundations/scenes/plane_distance/PlaneDistanceUI.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ rotation: [3]f32 = .{
44
std.math.pi,
55
std.math.pi,
66
},
7-
translate: [3]f32 = .{ -100, -100, -100 },
7+
translate: [3]f32 = .{ 0, 0, -20 },
88
updated: bool = true,
99

1010
const PlaneDistanceUI = @This();

0 commit comments

Comments
 (0)