Move FRAME_HEIGHT back to constants

Where it belongs
This commit is contained in:
Grant Sanderson 2024-12-06 12:35:39 -07:00
parent 09c27a654f
commit 0ef12ad7e4
2 changed files with 1 additions and 9 deletions

View file

@ -21,11 +21,6 @@ if TYPE_CHECKING:
from typing import Optional
# This has to be here instead of in constants.py
# due to its use in creating the camera configuration
FRAME_HEIGHT: float = 8.0
def parse_cli():
try:
parser = argparse.ArgumentParser()
@ -347,9 +342,6 @@ def get_camera_config(args: Optional[Namespace] = None, global_config: Optional[
camera_config = {
"pixel_width": width,
"pixel_height": height,
"frame_config": {
"frame_shape": ((width / height) * FRAME_HEIGHT, FRAME_HEIGHT),
},
"fps": fps,
}

View file

@ -2,7 +2,6 @@ from __future__ import annotations
import numpy as np
from manimlib.config import get_resolution
from manimlib.config import FRAME_HEIGHT
from typing import TYPE_CHECKING
if TYPE_CHECKING:
@ -20,6 +19,7 @@ DEFAULT_FPS: int = 30
# Sizes relevant to default camera frame
ASPECT_RATIO: float = DEFAULT_PIXEL_WIDTH / DEFAULT_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