A community-maintained Python framework for creating mathematical animations.
Add OpenGLText and related classes
Devin Nealc61bf02879b2
diff --git a/example_scenes/basic.py b/example_scenes/basic.pyindex e4b182f25..42ec62950 100644--- a/example_scenes/basic.py+++ b/example_scenes/basic.py@@ -16,12 +16,20 @@ from manim import *class TestLatex(Scene):def construct(self):- # mob = SVGMobject("../manim/media/Tex/1e2155e0e4bdc7ad.svg").scale(3)- # mob.set_color(WHITE)- # self.play(FadeIn(mob))- mob = Text("This is some text").set_width(13)- self.play(Write(mob))- self.wait(2)+ mob = Paragraph(+ "this is a awesome",+ "paragraph",+ "With \nNewlines",+ "\tWith Tabs",+ " With Spaces",+ "With Alignments",+ "center",+ "left",+ "right",+ )+ anim = Write(mob)+ self.play(anim)+ self.wait()class OpeningManim(Scene):diff --git a/example_scenes/opengl.py b/example_scenes/opengl.pyindex 4f4dc2a35..fc2979fef 100644--- a/example_scenes/opengl.py+++ b/example_scenes/opengl.py@@ -13,11 +13,13 @@ class TestLatex(Scene):config["background_color"] = "#333333"# mob = OpenGLSVGMobject("../manim/media/Tex/184715fb937073ce.svg").scale(3)# mob.set_color(WHITE)- mob = OpenGLCairoText("Manim Community").set_width(12)- self.play(Write(mob))- print(len(mob.submobjects))++ mob = OpenGLTex("This is some text")++ anim = Write(mob)+ self.play(anim)self.wait()- # self.interact()+ self.interact()class InteractiveDevelopment(Scene):diff --git a/manim/mobject/svg/opengl_tex_mobject.py b/manim/mobject/svg/opengl_tex_mobject.pyindex 58bd711aa..9987a1e86 100644--- a/manim/mobject/svg/opengl_tex_mobject.py+++ b/manim/mobject/svg/opengl_tex_mobject.py@@ -342,7 +342,6 @@ class OpenGLSingleStringMathTex(OpenGLSVGMobject):return selfdef init_colors(self, propagate_colors=True):- # OpenGLSVGMobject.init_colors(self, propagate_colors=propagate_colors)OpenGLSVGMobject.set_style(self,fill_color=self.fill_color or self.color,diff --git a/manim/mobject/types/opengl_vectorized_mobject.py b/manim/mobject/types/opengl_vectorized_mobject.pyindex 57e9894f8..954d5d0eb 100644--- a/manim/mobject/types/opengl_vectorized_mobject.py+++ b/manim/mobject/types/opengl_vectorized_mobject.py@@ -119,10 +119,8 @@ class OpenGLVMobject(OpenGLMobject):super().__init__(**kwargs)self.refresh_unit_normal()- #- # def get_group_class(self):- # return VGroup- #+ def get_group_class(self):+ return OpenGLVGroupdef init_data(self):super().init_data()