mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Minor clean up
This commit is contained in:
parent
1d14bae092
commit
361d9d0652
2 changed files with 6 additions and 9 deletions
|
@ -11,13 +11,12 @@ if TYPE_CHECKING:
|
|||
|
||||
|
||||
# TODO, it feels a bit unprincipled to have some global constants
|
||||
# depend on the output of this function, all for all that configuration
|
||||
# code to be run merely upon importing from this file
|
||||
# depend on the output of this function, and for all that configuration
|
||||
# code to be run merely upon importing from this file.
|
||||
CAMERA_CONFIG = get_camera_config()
|
||||
|
||||
# Sizes relevant to default camera frame
|
||||
ASPECT_RATIO: float = CAMERA_CONFIG['pixel_width'] / CAMERA_CONFIG['pixel_height']
|
||||
# FRAME_HEIGHT: float = 8.0
|
||||
FRAME_WIDTH: float = FRAME_HEIGHT * ASPECT_RATIO
|
||||
FRAME_SHAPE: tuple[float, float] = (FRAME_WIDTH, FRAME_HEIGHT)
|
||||
FRAME_Y_RADIUS: float = FRAME_HEIGHT / 2
|
||||
|
|
|
@ -116,11 +116,9 @@ def get_scene_classes_from_module(module):
|
|||
|
||||
|
||||
def main(scene_config, run_config):
|
||||
module = run_config["module"]
|
||||
if module is None:
|
||||
if run_config["module"] is None:
|
||||
# If no module was passed in, just play the blank scene
|
||||
return [BlankScene(**scene_config)]
|
||||
|
||||
all_scene_classes = get_scene_classes_from_module(module)
|
||||
scenes = get_scenes_to_render(all_scene_classes, scene_config, run_config)
|
||||
return scenes
|
||||
all_scene_classes = get_scene_classes_from_module(run_config["module"])
|
||||
return get_scenes_to_render(all_scene_classes, scene_config, run_config)
|
||||
|
|
Loading…
Add table
Reference in a new issue