Skip to content

Commit

Permalink
Add method for resetting which plane in 3d space behaves like the flo…
Browse files Browse the repository at this point in the history
…or when panning
  • Loading branch information
3b1b committed Feb 21, 2024
1 parent 712fa30 commit 4a89376
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions manimlib/scene/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,13 @@ def is_window_closing(self):
return self.window and (self.window.is_closing or self.quit_interaction)

# Event handling
def set_floor_plane(self, plane: str = "xy"):
if plane == "xy":
self.frame.set_euler_axes("zxz")
elif plane == "xz":
self.frame.set_euler_axes("zxy")
else:
raise Exception("Only `xz` and `xy` are valid floor planes")

def on_mouse_motion(
self,
Expand Down

0 comments on commit 4a89376

Please sign in to comment.