A community-maintained Python framework for creating mathematical animations.
VFadeInThenOut
Grant Sanderson677f67cb9d14
diff --git a/manimlib/animation/fading.py b/manimlib/animation/fading.pyindex 8f900c97b..9f5ea190d 100644--- a/manimlib/animation/fading.py+++ b/manimlib/animation/fading.py@@ -4,6 +4,7 @@ from manimlib.animation.transform import Transformfrom manimlib.constants import DOWNfrom manimlib.mobject.types.vectorized_mobject import VMobjectfrom manimlib.utils.bezier import interpolate+from manimlib.utils.rate_functions import there_and_backDEFAULT_FADE_LAG_RATIO = 0@@ -149,3 +150,10 @@ class VFadeOut(VFadeIn):def interpolate_submobject(self, submob, start, alpha):super().interpolate_submobject(submob, start, 1 - alpha)+++class VFadeInThenOut(VFadeIn):+ CONFIG = {+ "rate_func": there_and_back,+ "remover": True,+ }