From 677f67cb9d14918a0ccfe3b9ddcb60670d01fd9e Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Fri, 22 Mar 2019 11:50:16 -0700 Subject: [PATCH] VFadeInThenOut --- manimlib/animation/fading.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/manimlib/animation/fading.py b/manimlib/animation/fading.py index 8f900c97..9f5ea190 100644 --- a/manimlib/animation/fading.py +++ b/manimlib/animation/fading.py @@ -4,6 +4,7 @@ from manimlib.animation.transform import Transform from manimlib.constants import DOWN from manimlib.mobject.types.vectorized_mobject import VMobject from manimlib.utils.bezier import interpolate +from manimlib.utils.rate_functions import there_and_back DEFAULT_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, + }