mirror of
https://github.com/3b1b/manim.git
synced 2025-08-03 04:04:36 +08:00
Consolidate camera configuration
This commit is contained in:
@ -8,7 +8,7 @@ from PIL import Image
|
||||
from manimlib.camera.camera_frame import CameraFrame
|
||||
from manimlib.constants import BLACK
|
||||
from manimlib.constants import DEFAULT_FPS
|
||||
from manimlib.constants import DEFAULT_PIXEL_HEIGHT, DEFAULT_PIXEL_WIDTH
|
||||
from manimlib.constants import DEFAULT_RESOLUTION
|
||||
from manimlib.constants import FRAME_HEIGHT
|
||||
from manimlib.constants import FRAME_WIDTH
|
||||
from manimlib.mobject.mobject import Mobject
|
||||
@ -29,10 +29,9 @@ class Camera(object):
|
||||
window: Optional[Window] = None,
|
||||
background_image: Optional[str] = None,
|
||||
frame_config: dict = dict(),
|
||||
pixel_width: int = DEFAULT_PIXEL_WIDTH,
|
||||
pixel_height: int = DEFAULT_PIXEL_HEIGHT,
|
||||
# Note: frame height and width will be resized to match this resolution aspect ratio
|
||||
resolution=DEFAULT_RESOLUTION,
|
||||
fps: int = DEFAULT_FPS,
|
||||
# Note: frame height and width will be resized to match the pixel aspect ratio
|
||||
background_color: ManimColor = BLACK,
|
||||
background_opacity: float = 1.0,
|
||||
# Points in vectorized mobjects with norm greater
|
||||
@ -47,9 +46,9 @@ class Camera(object):
|
||||
# to set samples to be greater than 0.
|
||||
samples: int = 0,
|
||||
):
|
||||
self.background_image = background_image
|
||||
self.window = window
|
||||
self.default_pixel_shape = (pixel_width, pixel_height)
|
||||
self.background_image = background_image
|
||||
self.default_pixel_shape = resolution # Rename?
|
||||
self.fps = fps
|
||||
self.max_allowable_norm = max_allowable_norm
|
||||
self.image_mode = image_mode
|
||||
|
Reference in New Issue
Block a user