mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Default to applying depth test for non-fixed objects added to a 3d scene
This commit is contained in:
parent
368f48f8dd
commit
c08e111911
1 changed files with 6 additions and 0 deletions
|
@ -983,3 +983,9 @@ class EndScene(Exception):
|
|||
class ThreeDScene(Scene):
|
||||
samples = 4
|
||||
default_frame_orientation = (-30, 70)
|
||||
|
||||
def add(self, *mobjects, set_depth_test: bool = True):
|
||||
for mob in mobjects:
|
||||
if set_depth_test and not mob.is_fixed_in_frame():
|
||||
mob.apply_depth_test()
|
||||
super().add(*mobjects)
|
||||
|
|
Loading…
Add table
Reference in a new issue