mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 22:57:44 +00:00
Make panning more sensitive to mouse movements
This commit is contained in:
parent
8b1f0a8749
commit
9d0cc810c5
1 changed files with 3 additions and 2 deletions
|
|
@ -38,6 +38,7 @@ class Scene(object):
|
|||
"preview": True,
|
||||
"presenter_mode": False,
|
||||
"linger_after_completion": True,
|
||||
"pan_sensitivity": 3,
|
||||
}
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
|
@ -562,8 +563,8 @@ class Scene(object):
|
|||
|
||||
frame = self.camera.frame
|
||||
if self.window.is_key_pressed(ord("d")):
|
||||
frame.increment_theta(-d_point[0])
|
||||
frame.increment_phi(d_point[1])
|
||||
frame.increment_theta(-self.pan_sensitivity * d_point[0])
|
||||
frame.increment_phi(self.pan_sensitivity * d_point[1])
|
||||
elif self.window.is_key_pressed(ord("s")):
|
||||
shift = -d_point
|
||||
shift[0] *= frame.get_width() / 2
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue