Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Added FadeInFromPoint

Grant Sandersonb29597d39bd3
diff --git a/manimlib/animation/fading.py b/manimlib/animation/fading.py
index 5493af0c2..8f900c97b 100644
--- a/manimlib/animation/fading.py
+++ b/manimlib/animation/fading.py
@@ -97,6 +97,18 @@ class FadeOutAndShiftDown(FadeOutAndShift):
}
+class FadeInFromPoint(FadeIn):
+ def __init__(self, mobject, point, **kwargs):
+ self.point = point
+ super().__init__(mobject, **kwargs)
+
+ def create_starting_mobject(self):
+ start = super().create_starting_mobject()
+ start.scale(0)
+ start.move_to(self.point)
+ return start
+
+
class FadeInFromLarge(FadeIn):
CONFIG = {
"scale_factor": 2,