- class ManimBanner(dark_theme=True)#
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.
Example: DarkThemeBanner ¶
from manim import * class DarkThemeBanner(Scene): def construct(self): banner = ManimBanner() self.play(banner.create()) self.play(banner.expand()) self.wait() self.play(Unwrite(banner))
Example: LightThemeBanner ¶
from manim import * class LightThemeBanner(Scene): def construct(self): self.camera.background_color = "#ece6e2" banner = ManimBanner(dark_theme=False) self.play(banner.create()) self.play(banner.expand()) self.wait() self.play(Unwrite(banner))
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.
Used to animate the application of any method of
The depth of the mobject.
If there are multiple colors (for gradient) this returns the first one
The height of the mobject.
The width of the mobject.
The creation animation for Manim’s logo.
- expand(run_time=1.5, direction='center')#
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.
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.
run_time (float) – The run time of the animation.
direction – The direction in which the logo is expanded.
An animation to be used in a
- Return type
Example: ExpandDirections ¶
from manim import * class ExpandDirections(Scene): def construct(self): banners = [ManimBanner().scale(0.5).shift(UP*x) for x in [-2, 0, 2]] self.play( banners.expand(direction="right"), banners.expand(direction="center"), banners.expand(direction="left"), )