Add method for resetting which plane in 3d space behaves like the floor when panning

This commit is contained in:
Grant Sanderson 2024-02-21 12:42:59 -08:00
parent 712fa30174
commit 4a89376fdd

View file

@ -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,