ManimBanner
(dark_theme=True)[source]¶Bases: manim.mobject.types.vectorized_mobject.VGroup
Convenience class representing Manim’s banner.
Can be animated using custom methods.
dark_theme (bool) – If True
(the default), the dark theme version of the logo
(with light text font) will be rendered. Otherwise, if False
,
the light theme version (with dark text font) is used.
Examples
class BannerDarkBackground(Scene):
def construct(self):
banner = ManimBanner().scale(0.5).to_corner(DR)
self.play(FadeIn(banner))
self.play(banner.expand())
self.play(FadeOut(banner))
class BannerLightBackground(Scene):
def construct(self):
self.camera.background_color = "#ece6e2"
banner_large = ManimBanner(dark_theme=False).scale(0.7)
banner_small = ManimBanner(dark_theme=False).scale(0.35)
banner_small.next_to(banner_large, DOWN)
self.play(banner_large.create(), banner_small.create())
self.play(banner_large.expand(), banner_small.expand())
self.play(FadeOut(banner_large), FadeOut(banner_small))
Methods
The creation animation for Manim’s logo. |
|
An animation that expands Manim’s logo into its banner. |
|
Scale the banner by the specified scale factor. |
Attributes
|
Used to animate the application of a method. |
create
()[source]¶The creation animation for Manim’s logo.
An animation to be used in a Scene.play()
call.
expand
()[source]¶An animation that expands Manim’s logo into its banner.
The returned animation transforms the banner from its initial state (representing Manim’s logo with just the icons) to its expanded state (showing the full name together with the icons).
See the class documentation for how to use this.
Note
Before calling this method, the text “anim” is not a submobject of the banner object. After the expansion, it is added as a submobject so subsequent animations to the banner object apply to the text “anim” as well.
An animation to be used in a Scene.play()
call.