mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-08-06 14:19:52 +08:00
feat(lib): add Slide.next_section
method (#295)
* feat(lib): add `Slide.next_section` method * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -64,6 +64,25 @@ class Slide(BaseSlide, Scene): # type: ignore[misc]
|
||||
def _start_at_animation_number(self) -> Optional[int]:
|
||||
return config["from_animation_number"] # type: ignore
|
||||
|
||||
def next_section(self, *args: Any, **kwargs: Any) -> None:
|
||||
"""
|
||||
Alias to :meth:`next_slide`.
|
||||
|
||||
:param args:
|
||||
Positional arguments to be passed to :meth:`next_slide`.
|
||||
:param kwargs:
|
||||
Keyword arguments to be passed to :meth:`next_slide`.
|
||||
|
||||
.. attention::
|
||||
|
||||
This method is only available when using ``manim`` API.
|
||||
"""
|
||||
self.next_slide(*args, **kwargs)
|
||||
|
||||
def next_slide(self, *args: Any, loop: bool = False, **kwargs: Any) -> None:
|
||||
Scene.next_section(self, *args, **kwargs)
|
||||
BaseSlide.next_slide(self, loop=loop)
|
||||
|
||||
def render(self, *args: Any, **kwargs: Any) -> None:
|
||||
"""MANIM render."""
|
||||
# We need to disable the caching limit since we rely on intermediate files
|
||||
|
Reference in New Issue
Block a user