mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
* Allow using `MovingCamera.auto_zoom` without animation * added test for auto_zoom width * type hints for MovingCamera.auto_zoom * black * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
11 lines
297 B
Python
11 lines
297 B
Python
from __future__ import annotations
|
|
|
|
from manim import MovingCamera, Square
|
|
|
|
|
|
def test_movingcamera_auto_zoom():
|
|
camera = MovingCamera()
|
|
square = Square()
|
|
margin = 0.5
|
|
camera.auto_zoom([square], margin=margin, animate=False)
|
|
assert camera.frame.height == square.height + margin
|