mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Make sure animations will trigger a refresh for joint products
This commit is contained in:
parent
92e4d43ca3
commit
60aae748a7
2 changed files with 10 additions and 5 deletions
|
@ -98,11 +98,7 @@ class DrawBorderThenFill(Animation):
|
|||
self.mobject = vmobject
|
||||
|
||||
def begin(self) -> None:
|
||||
# Trigger triangulation calculation
|
||||
for submob in self.mobject.get_family():
|
||||
if not submob._use_winding_fill:
|
||||
submob.get_triangulation()
|
||||
|
||||
self.mobject.set_animating_status(True)
|
||||
self.outline = self.get_outline()
|
||||
super().begin()
|
||||
self.mobject.match_style(self.outline)
|
||||
|
|
|
@ -1239,6 +1239,15 @@ class VMobject(Mobject):
|
|||
super().apply_points_function(*args, **kwargs)
|
||||
self.refresh_joint_products()
|
||||
|
||||
def set_animating_status(self, is_animating: bool, recurse: bool = True):
|
||||
super().set_animating_status(is_animating, recurse)
|
||||
if is_animating:
|
||||
for submob in self.get_family(recurse):
|
||||
submob.get_joint_products(refresh=True)
|
||||
if not submob._use_winding_fill:
|
||||
submob.get_triangulation()
|
||||
return self
|
||||
|
||||
# For shaders
|
||||
def init_shader_data(self, ctx: Context):
|
||||
dtype = self.shader_dtype
|
||||
|
|
Loading…
Add table
Reference in a new issue