diff --git a/manimlib/imports.py b/manimlib/imports.py index 1020f8ce0a..ad1ecc7e52 100644 --- a/manimlib/imports.py +++ b/manimlib/imports.py @@ -65,14 +65,6 @@ from manimlib.for_3b1b_videos.pi_creature_animations import * from manimlib.for_3b1b_videos.pi_creature_scene import * -from manimlib.once_useful_constructs.arithmetic import * -from manimlib.once_useful_constructs.combinatorics import * -from manimlib.once_useful_constructs.complex_transformation_scene import * -from manimlib.once_useful_constructs.counting import * -from manimlib.once_useful_constructs.fractals import * -from manimlib.once_useful_constructs.graph_theory import * -from manimlib.once_useful_constructs.light import * - from manimlib.scene.graph_scene import * from manimlib.scene.moving_camera_scene import * from manimlib.scene.reconfigurable_scene import * diff --git a/example_scenes.py b/samples/sample_scenes.py similarity index 100% rename from example_scenes.py rename to samples/sample_scenes.py diff --git a/tests/tests_sample_scenes.py b/tests/tests_sample_scenes.py new file mode 100644 index 0000000000..4e598822d0 --- /dev/null +++ b/tests/tests_sample_scenes.py @@ -0,0 +1,52 @@ +from manimlib.imports import * + +# This file is intended to test any new feature added. +# Feel free to add a test or to modify one when adding a new/changing a feature. + +class Test_geometry(Scene): + def construct(self): + circle = Circle() + square = Square() + square.flip(RIGHT) + square.rotate(-3 * TAU / 8) + circle.set_fill(PINK, opacity=0.5) + self.play(ShowCreation(square)) + self.play(Transform(square, circle)) + self.play(FadeOut(square)) + + text = Text("Testing !") + self.play(DrawBorderThenFill(text)) + + decimal = DecimalNumber( + 0, + show_ellipsis=True, + num_decimal_places=3, + include_sign=True, + ) + square = Square().to_edge(UP) + + decimal.add_updater(lambda d: d.next_to(square, RIGHT)) + decimal.add_updater(lambda d: d.set_value(square.get_center()[1])) + self.add(square, decimal) + self.play( + square.to_edge, DOWN, + rate_func=there_and_back, + run_time=1, + ) + self.wait() + +class Test_plotting(GraphScene): + CONFIG = { + "x_min" : -10, + "x_max" : 10.3, + "y_min" : -1.5, + "y_max" : 1.5, + "graph_origin" : ORIGIN , + "function_color" : RED , + "axes_color" : GREEN, + "x_labeled_nums" :range(-10,12,2), + } + def construct(self): + self.setup_axes(animate=False) + func_graph = self.get_graph(lambda x : x**2, self.function_color) + self.play(ShowCreation(func_graph))