mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 19:46:21 +08:00
Set defaults so that VMobjects will have no antialias width when depth test is turned on
This commit is contained in:
@ -433,6 +433,28 @@ class VMobject(Mobject):
|
||||
def get_joint_type(self) -> float:
|
||||
return self.uniforms["joint_type"]
|
||||
|
||||
def apply_depth_test(
|
||||
self,
|
||||
anti_alias_width: float = 0,
|
||||
fill_border_width: float = 0,
|
||||
recurse: bool=True
|
||||
):
|
||||
super().apply_depth_test(recurse)
|
||||
self.set_anti_alias_width(anti_alias_width)
|
||||
self.set_fill(border_width=fill_border_width)
|
||||
return self
|
||||
|
||||
def deactivate_depth_test(
|
||||
self,
|
||||
anti_alias_width: float = 1.0,
|
||||
fill_border_width: float = 0.5,
|
||||
recurse: bool=True
|
||||
):
|
||||
super().apply_depth_test(recurse)
|
||||
self.set_anti_alias_width(anti_alias_width)
|
||||
self.set_fill(border_width=fill_border_width)
|
||||
return self
|
||||
|
||||
@Mobject.affects_family_data
|
||||
def use_winding_fill(self, value: bool = True, recurse: bool = True):
|
||||
for submob in self.get_family(recurse):
|
||||
|
Reference in New Issue
Block a user