Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Turn live stream related configurations into constants

Mehmet Mert Yildiran312c2b02432c
diff --git a/constants.py b/constants.py
index 4478e211e..14ef7de89 100644
--- a/constants.py
+++ b/constants.py
@@ -211,3 +211,6 @@ PALETTE = list(COLOR_MAP.values())
locals().update(COLOR_MAP)
for name in [s for s in list(COLOR_MAP.keys()) if s.endswith("_C")]:
locals()[name.replace("_C", "")] = locals()[name]
+
+IS_LIVE_STREAMING = True
+LIVE_STREAM_NAME = "LiveStream"
diff --git a/manim.py b/manim.py
index bb597ba9d..0448d1e40 100644
--- a/manim.py
+++ b/manim.py
@@ -8,8 +8,7 @@ class Manim():
def __new__(cls):
kwargs = {
- "file": "example_file.py",
- "scene_name": "LiveStream",
+ "scene_name": LIVE_STREAM_NAME,
"open_video_upon_completion": False,
"show_file_in_finder": False,
# By default, write to file
@@ -22,12 +21,12 @@ class Manim():
"quiet": True,
"ignore_waits": False,
"write_all": False,
- "name": "LiveStream",
+ "name": LIVE_STREAM_NAME,
"start_at_animation_number": 0,
"end_at_animation_number": None,
"skip_animations": False,
"camera_config": HIGH_QUALITY_CAMERA_CONFIG,
"frame_duration": PRODUCTION_QUALITY_FRAME_DURATION,
- "is_live_streaming": True,
+ "is_live_streaming": IS_LIVE_STREAMING
}
return Scene(**kwargs)
diff --git a/test1.py b/test1.py
index 60ebfba54..ab2e173b6 100644
--- a/test1.py
+++ b/test1.py
@@ -1,22 +1,6 @@
from big_ol_pile_of_manim_imports import *
from manim import Manim
-class Shapes(Scene):
- #A few simple shapes
- def construct(self):
- circle = Circle()
- square = Square()
- line = Line(np.array([3,0,0]),np.array([5,0,0]))
- triangle = Polygon(np.array([0,0,0]),np.array([1,1,0]),np.array([1,-1,0]))
-
- self.add(line)
- self.play(ShowCreation(circle))
- self.play(FadeOut(circle))
- self.play(GrowFromCenter(square))
- self.play(Transform(square,triangle))
-
-#python3 extract_scene.py test1.py Shapes -r 1080
-
manim = Manim()