mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-09-20 07:56:59 +08:00
chore(lib): simplify how to add config options (#321)
* chore(lib): simplify how to add config options * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * chore(lint): some fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -3,6 +3,7 @@ from typing import Any, List, Optional, Tuple
|
||||
|
||||
from manim import Scene, ThreeDScene, config
|
||||
|
||||
from ..config import BaseSlideConfig
|
||||
from .base import BaseSlide
|
||||
|
||||
|
||||
@ -79,22 +80,17 @@ class Slide(BaseSlide, Scene): # type: ignore[misc]
|
||||
"""
|
||||
self.next_slide(*args, **kwargs)
|
||||
|
||||
@BaseSlideConfig.wrapper("base_slide_config")
|
||||
def next_slide(
|
||||
self,
|
||||
*args: Any,
|
||||
loop: bool = False,
|
||||
auto_next: bool = False,
|
||||
playback_rate: float = 1.0,
|
||||
reversed_playback_rate: float = 1.0,
|
||||
base_slide_config: BaseSlideConfig,
|
||||
**kwargs: Any,
|
||||
) -> None:
|
||||
Scene.next_section(self, *args, **kwargs)
|
||||
BaseSlide.next_slide(
|
||||
BaseSlide.next_slide.__wrapped__(
|
||||
self,
|
||||
loop=loop,
|
||||
auto_next=auto_next,
|
||||
playback_rate=playback_rate,
|
||||
reversed_playback_rate=reversed_playback_rate,
|
||||
base_slide_config=base_slide_config,
|
||||
)
|
||||
|
||||
def render(self, *args: Any, **kwargs: Any) -> None:
|
||||
|
Reference in New Issue
Block a user