Invert zoom direction

The intent behind the original zoom direction was to provide a
consistent metaphor: You manipulate the model, not an abstract camera.

Unfortunately, it turned out to not be that simple. At least on Gnome,
if you enable "natural scrolling" (which is the same metaphor, applied
to the Gnome UI), you invert all mouse whell input, and so also the zoom
direction in Fornjot.

With this change, the zoom direction in Fornjot follows the "natural
scrolling" configuration in Gnome. Unfortunately I don't have data from
other platforms.
This commit is contained in:
Hanno Braun 2022-10-11 14:07:32 +02:00
parent 856a93b643
commit 70b446fb07

View File

@ -14,6 +14,6 @@ impl Zoom {
let distance = (focus_point.0 - camera.position()).magnitude();
let displacement = zoom_delta * distance.into_f64();
camera.translation = camera.translation
* Transform::translation(Vector::from([0.0, 0.0, -displacement]));
* Transform::translation(Vector::from([0.0, 0.0, displacement]));
}
}