mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 02:35:22 +08:00
Move FRAME_HEIGHT back to constants
Where it belongs
This commit is contained in:
@ -21,11 +21,6 @@ if TYPE_CHECKING:
|
|||||||
from typing import Optional
|
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():
|
def parse_cli():
|
||||||
try:
|
try:
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
@ -347,9 +342,6 @@ def get_camera_config(args: Optional[Namespace] = None, global_config: Optional[
|
|||||||
camera_config = {
|
camera_config = {
|
||||||
"pixel_width": width,
|
"pixel_width": width,
|
||||||
"pixel_height": height,
|
"pixel_height": height,
|
||||||
"frame_config": {
|
|
||||||
"frame_shape": ((width / height) * FRAME_HEIGHT, FRAME_HEIGHT),
|
|
||||||
},
|
|
||||||
"fps": fps,
|
"fps": fps,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ from __future__ import annotations
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from manimlib.config import get_resolution
|
from manimlib.config import get_resolution
|
||||||
from manimlib.config import FRAME_HEIGHT
|
|
||||||
|
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
@ -20,6 +19,7 @@ DEFAULT_FPS: int = 30
|
|||||||
|
|
||||||
# Sizes relevant to default camera frame
|
# Sizes relevant to default camera frame
|
||||||
ASPECT_RATIO: float = DEFAULT_PIXEL_WIDTH / DEFAULT_PIXEL_HEIGHT
|
ASPECT_RATIO: float = DEFAULT_PIXEL_WIDTH / DEFAULT_PIXEL_HEIGHT
|
||||||
|
FRAME_HEIGHT: float = 8.0
|
||||||
FRAME_WIDTH: float = FRAME_HEIGHT * ASPECT_RATIO
|
FRAME_WIDTH: float = FRAME_HEIGHT * ASPECT_RATIO
|
||||||
FRAME_SHAPE: tuple[float, float] = (FRAME_WIDTH, FRAME_HEIGHT)
|
FRAME_SHAPE: tuple[float, float] = (FRAME_WIDTH, FRAME_HEIGHT)
|
||||||
FRAME_Y_RADIUS: float = FRAME_HEIGHT / 2
|
FRAME_Y_RADIUS: float = FRAME_HEIGHT / 2
|
||||||
|
Reference in New Issue
Block a user