diff --git a/active_projects/clacks.py b/active_projects/clacks.py index d2f17b5c..dfc8a395 100644 --- a/active_projects/clacks.py +++ b/active_projects/clacks.py @@ -927,7 +927,7 @@ class PiComputingAlgorithmsAxes(Scene): lag_ratio=0.4, )) self.wait() - self.play(CircleThenFadeAround(algorithms[-1][0])) + self.play(ShowCreationThenFadeAround(algorithms[-1][0])) def get_machin_like_formula(self): formula = TexMobject( diff --git a/active_projects/clacks_solution1.py b/active_projects/clacks_solution1.py index e7e76539..e015aa86 100644 --- a/active_projects/clacks_solution1.py +++ b/active_projects/clacks_solution1.py @@ -385,7 +385,7 @@ class AskAboutFindingNewVelocities(Scene): ).set_color(YELLOW) self.play( - CircleThenFadeAround(energy_expression), + ShowCreationThenFadeAround(energy_expression), momentum_text.set_fill, {"opacity": 0.25}, FadeOut(self.all_velocity_labels), ) @@ -616,9 +616,8 @@ class IntroduceVelocityPhaseSpace(AskAboutFindingNewVelocities): self.add(equations) self.play(LaggedStart( - AnimationGroup, + ShowCreationThenDestruction, equations.copy().set_stroke(YELLOW, 3).set_fill(opacity=0), - lambda m: (ShowCreation(m), FadeOut(m)), lag_ratio=0.8, remover=True, )) diff --git a/manimlib/animation/creation.py b/manimlib/animation/creation.py index 54ed21aa..652d3892 100644 --- a/manimlib/animation/creation.py +++ b/manimlib/animation/creation.py @@ -203,6 +203,7 @@ class VFadeIn(Animation): to mobjects while they are being animated in some other way (e.g. shifting then) in a way that does not work with FadeIn and FadeOut """ + def update_submobject(self, submobject, starting_submobject, alpha): submobject.set_stroke( opacity=interpolate(0, starting_submobject.get_stroke_opacity(), alpha) diff --git a/manimlib/animation/indication.py b/manimlib/animation/indication.py index beb4f2cd..02f6c2f9 100644 --- a/manimlib/animation/indication.py +++ b/manimlib/animation/indication.py @@ -174,7 +174,7 @@ class ShowCreationThenDestructionAround(AnimationOnSurroundingRectangle): } -class CircleThenFadeAround(AnimationOnSurroundingRectangle): +class ShowCreationThenFadeAround(AnimationOnSurroundingRectangle): CONFIG = { "rect_to_animation": lambda rect: Succession( ShowCreation, rect, diff --git a/old_projects/borsuk_addition.py b/old_projects/borsuk_addition.py index 51509bd4..7c78944a 100644 --- a/old_projects/borsuk_addition.py +++ b/old_projects/borsuk_addition.py @@ -527,9 +527,9 @@ class FunctionGInSymbols(Scene): VGroup(seeking_text, g_equals_zero).shift, 1.5 * DOWN ) self.wait() - self.play(CircleThenFadeAround(g_of_neg_p[2])) + self.play(ShowCreationThenFadeAround(g_of_neg_p[2])) self.wait() - self.play(CircleThenFadeAround(neg_g_of_p)) + self.play(ShowCreationThenFadeAround(neg_g_of_p)) self.wait() self.play(neg_g_of_p.restore) rects = VGroup(*map(SurroundingRectangle, [f_of_p, f_of_neg_p])) diff --git a/old_projects/dandelin.py b/old_projects/dandelin.py index 9aaf8acf..a575219c 100644 --- a/old_projects/dandelin.py +++ b/old_projects/dandelin.py @@ -387,7 +387,7 @@ class ShowArrayOfEccentricities(Scene): e_copy.set_color(RED) self.play(ShowCreation(e_copy)) self.play( - CircleThenFadeAround( + ShowCreationThenFadeAround( eccentricity_labels[i], ), FadeOut(e_copy) diff --git a/old_projects/div_curl.py b/old_projects/div_curl.py index ffec9a96..e6e55675 100644 --- a/old_projects/div_curl.py +++ b/old_projects/div_curl.py @@ -857,7 +857,7 @@ class CylinderModel(Scene): self.wait() self.play( movers.apply_complex_function, joukowsky_map, - CircleThenFadeAround(self.func_label), + ShowCreationThenFadeAround(self.func_label), run_time=2 ) self.add(self.get_stream_lines_animation(stream_lines)) diff --git a/old_projects/for_flammy.py b/old_projects/for_flammy.py index f41e6391..912a2bc7 100644 --- a/old_projects/for_flammy.py +++ b/old_projects/for_flammy.py @@ -310,9 +310,9 @@ class IntegralSymbols(Scene): self.play(FadeInFrom(rhs, 4 * LEFT)) self.wait() - self.play(CircleThenFadeAround(rhs[1])) + self.play(ShowCreationThenFadeAround(rhs[1])) self.wait() - self.play(CircleThenFadeAround(rhs[2:])) + self.play(ShowCreationThenFadeAround(rhs[2:])) self.wait() self.play( GrowFromCenter(int_brace), diff --git a/old_projects/lost_lecture.py b/old_projects/lost_lecture.py index 599230c8..d9d81e0f 100644 --- a/old_projects/lost_lecture.py +++ b/old_projects/lost_lecture.py @@ -3360,7 +3360,7 @@ class ShowEqualAngleSlices(IntroduceShapeOfVelocities): delta_t_numerator.scale, 1.5, {"about_edge": DOWN}, delta_t_numerator.set_color, YELLOW ) - self.play(CircleThenFadeAround(prop_exp[:-2])) + self.play(ShowCreationThenFadeAround(prop_exp[:-2])) self.play( delta_t_numerator.fade, 1, MoveToTarget(moving_R_squared), @@ -3447,7 +3447,7 @@ class ShowEqualAngleSlices(IntroduceShapeOfVelocities): polygon.set_fill(BLUE_E, opacity=0.8) polygon.set_stroke(WHITE, 3) - self.play(CircleThenFadeAround(v1)) + self.play(ShowCreationThenFadeAround(v1)) self.play( MoveToTarget(v1), GrowFromCenter(root_dot), diff --git a/old_projects/quaternions.py b/old_projects/quaternions.py index f0e3ebe8..7e89ecfa 100644 --- a/old_projects/quaternions.py +++ b/old_projects/quaternions.py @@ -4182,7 +4182,7 @@ class IntroduceQuaternions(Scene): FadeInFromDown(number), Write(label), ) - self.play(CircleThenFadeAround( + self.play(ShowCreationThenFadeAround( number[2:], surrounding_rectangle_config={"color": BLUE} )) @@ -4630,7 +4630,7 @@ class BreakUpQuaternionMultiplicationInParts(Scene): ) self.play( randy.change, "confused", rotate_words, - CircleThenFadeAround(rotate_words), + ShowCreationThenFadeAround(rotate_words), ) self.play(LaggedStart( FadeInFrom, q_marks, diff --git a/old_projects/sphere_area.py b/old_projects/sphere_area.py index 249236e5..4fc4daa2 100644 --- a/old_projects/sphere_area.py +++ b/old_projects/sphere_area.py @@ -1861,7 +1861,7 @@ class JustifyHeightSquish(MovingCameraScene): )) self.wait() self.play(ReplacementTransform(q_mark, alpha_label1)) - self.play(CircleThenFadeAround( + self.play(ShowCreationThenFadeAround( equation, surrounding_rectangle_config={ "buff": 0.015, diff --git a/old_projects/turbulence.py b/old_projects/turbulence.py index c574b7de..46e508b6 100644 --- a/old_projects/turbulence.py +++ b/old_projects/turbulence.py @@ -1018,7 +1018,7 @@ class ShowNavierStokesEquations(Scene): FadeInFromDown(labels[0]), newtons_second.next_to, variables, RIGHT, LARGE_BUFF ) - self.play(CircleThenFadeAround(parts[0])) + self.play(ShowCreationThenFadeAround(parts[0])) self.wait() self.play(LaggedStart(FadeInFrom, labels[1:])) self.wait(3)