A community-maintained Python framework for creating mathematical animations.
Introduced DrawBorderThenFill Animation
Grant Sanderson25e99ea1bc47
diff --git a/animation/simple_animations.py b/animation/simple_animations.pyindex d74d8731b..593e741db 100644--- a/animation/simple_animations.py+++ b/animation/simple_animations.py@@ -90,6 +90,7 @@ class DrawBorderThenFill(Animation):CONFIG = {"run_time" : 2,"stroke_width" : 2,+ "stroke_color" : None,"rate_func" : double_smooth,}def __init__(self, vmobject, **kwargs):@@ -100,14 +101,11 @@ class DrawBorderThenFill(Animation):def update_submobject(self, submobject, starting_submobject, alpha):if alpha < 0.5:- print 2*alphasubmobject.pointwise_become_partial(starting_submobject, 0, 2*alpha)- submobject.set_stroke(- starting_submobject.get_color(),- width = self.stroke_width- )+ color = self.stroke_color or starting_submobject.get_color()+ submobject.set_stroke(color, width = self.stroke_width)submobject.set_fill(opacity = 0)else:if not self.reached_halfway_point_before: