mirror of
https://github.com/3b1b/manim.git
synced 2025-08-01 17:29:06 +08:00
Add always_depth_test option to ThreeDScene, default to true
This commit is contained in:
@ -1021,9 +1021,10 @@ class EndScene(Exception):
|
||||
class ThreeDScene(Scene):
|
||||
samples = 4
|
||||
default_frame_orientation = (-30, 70)
|
||||
always_depth_test = True
|
||||
|
||||
def add(self, *mobjects, set_depth_test: bool = True):
|
||||
for mob in mobjects:
|
||||
if set_depth_test and not mob.is_fixed_in_frame():
|
||||
if set_depth_test and not mob.is_fixed_in_frame() and self.always_depth_test:
|
||||
mob.apply_depth_test()
|
||||
super().add(*mobjects)
|
||||
|
Reference in New Issue
Block a user