From 4a89376fdd9377eeab03cf950b96f345b215f6c2 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Wed, 21 Feb 2024 12:42:59 -0800 Subject: [PATCH] Add method for resetting which plane in 3d space behaves like the floor when panning --- manimlib/scene/scene.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/manimlib/scene/scene.py b/manimlib/scene/scene.py index 7e6b964a..cd95eef0 100644 --- a/manimlib/scene/scene.py +++ b/manimlib/scene/scene.py @@ -836,6 +836,13 @@ class Scene(object): 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,