Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Added ShowCreationThenFadeOut

Grant Sanderson1064f80d5b3e
diff --git a/manimlib/animation/indication.py b/manimlib/animation/indication.py
index 02f6c2f99..6b870378f 100644
--- a/manimlib/animation/indication.py
+++ b/manimlib/animation/indication.py
@@ -24,6 +24,7 @@ from manimlib.utils.rate_functions import smooth
from manimlib.utils.rate_functions import squish_rate_func
from manimlib.utils.rate_functions import there_and_back
from manimlib.utils.rate_functions import wiggle
+from manimlib.utils.rate_functions import double_smooth
class FocusOn(Transform):
@@ -143,6 +144,20 @@ class ShowCreationThenDestruction(ShowPassingFlash):
}
+class ShowCreationThenFadeOut(Succession):
+ CONFIG = {
+ "remover": True,
+ }
+
+ def __init__(self, mobject, **kwargs):
+ Succession.__init__(
+ self,
+ ShowCreation, mobject,
+ FadeOut, mobject,
+ **kwargs
+ )
+
+
class AnimationOnSurroundingRectangle(AnimationGroup):
CONFIG = {
"surrounding_rectangle_config": {},