Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

GrowArrow animation fixed, (fixes #1002) (#1003)

sparshg79eb19856383
diff --git a/manim/animation/growing.py b/manim/animation/growing.py
index 771c5f87e..c48fd23b8 100644
--- a/manim/animation/growing.py
+++ b/manim/animation/growing.py
@@ -57,6 +57,13 @@ class GrowArrow(GrowFromPoint):
point = arrow.get_start()
super().__init__(arrow, point, **kwargs)
+ def create_starting_mobject(self) -> "Mobject":
+ start_arrow = self.mobject.copy()
+ start_arrow.scale(0, scale_tips=True, about_point=self.point)
+ if self.point_color:
+ start_arrow.set_color(self.point_color)
+ return start_arrow
+
class SpinInFromNothing(GrowFromCenter):
def __init__(self, mobject: "Mobject", path_arc: float = PI, **kwargs) -> None:
diff --git a/manim/mobject/geometry.py b/manim/mobject/geometry.py
index b4507b1b5..06fa37873 100644
--- a/manim/mobject/geometry.py
+++ b/manim/mobject/geometry.py
@@ -856,6 +856,7 @@ class Arrow(Line):
if scale_tips:
VMobject.scale(self, factor, **kwargs)
+ self.set_stroke_width_from_length()
return self
has_tip = self.has_tip()