Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Fixed expand animation for :class:`.ManimBanner` (#3298)

Benjamin Hackl1cd0f43982dc
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 125be255c..c234a6e88 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -68,7 +68,7 @@ jobs:
uses: teatimeguest/setup-texlive-action@v2
with:
cache: true
- packages: scheme-basic fontspec inputenc fontenc tipa mathrsfs calligra xcolor standalone preview doublestroke ms everysel setspace rsfs relsize ragged2e fundus-calligra microtype wasysym physics dvisvgm jknapltx wasy cm-super babel-english gnu-freefont mathastext cbfonts-fd
+ packages: scheme-basic fontspec inputenc fontenc tipa mathrsfs calligra xcolor standalone preview doublestroke ms everysel setspace rsfs relsize ragged2e fundus-calligra microtype wasysym physics dvisvgm jknapltx wasy cm-super babel-english gnu-freefont mathastext cbfonts-fd xetex
- name: Start virtual display (Linux)
if: runner.os == 'Linux'
diff --git a/manim/mobject/logo.py b/manim/mobject/logo.py
index 429641e67..dcb87bde2 100644
--- a/manim/mobject/logo.py
+++ b/manim/mobject/logo.py
@@ -209,7 +209,7 @@ class ManimBanner(VGroup):
for letter in mob.anim:
if mob.square.get_center()[0] > letter.get_center()[0]:
letter.set_opacity(1)
- self.add(letter)
+ self.add_to_back(letter)
# Finish animation
if alpha == 1:
diff --git a/tests/test_graphical_units/control_data/logo/banner.npz b/tests/test_graphical_units/control_data/logo/banner.npz
new file mode 100644
index 000000000..c9d765ece
Binary files /dev/null and b/tests/test_graphical_units/control_data/logo/banner.npz differ
diff --git a/tests/test_graphical_units/test_banner.py b/tests/test_graphical_units/test_banner.py
new file mode 100644
index 000000000..97363dff7
--- /dev/null
+++ b/tests/test_graphical_units/test_banner.py
@@ -0,0 +1,13 @@
+from __future__ import annotations
+
+from manim import ManimBanner
+from manim.utils.testing.frames_comparison import frames_comparison
+
+__module_test__ = "logo"
+
+
+@frames_comparison(last_frame=False)
+def test_banner(scene):
+ banner = ManimBanner()
+ scene.play(banner.create(), run_time=0.5)
+ scene.play(banner.expand(), run_time=0.5)