mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Minor fix for zooming
It's weird that when you Scroll Up, the interactive shell zooms out. So to fix this replace factor -> 1/factor .
This commit is contained in:
parent
17d7f0b6f0
commit
4940ccac7d
1 changed files with 1 additions and 1 deletions
|
@ -570,7 +570,7 @@ class Scene(object):
|
||||||
frame = self.camera.frame
|
frame = self.camera.frame
|
||||||
if self.window.is_key_pressed(ord("z")):
|
if self.window.is_key_pressed(ord("z")):
|
||||||
factor = 1 + np.arctan(10 * offset[1])
|
factor = 1 + np.arctan(10 * offset[1])
|
||||||
frame.scale(factor, about_point=point)
|
frame.scale(1/factor, about_point=point)
|
||||||
else:
|
else:
|
||||||
transform = frame.get_inverse_camera_rotation_matrix()
|
transform = frame.get_inverse_camera_rotation_matrix()
|
||||||
shift = np.dot(np.transpose(transform), offset)
|
shift = np.dot(np.transpose(transform), offset)
|
||||||
|
|
Loading…
Add table
Reference in a new issue