mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-08-05 21:41:40 +08:00
feat(lib): add playback rate config options (#320)
* feat(lib): add playback rate config options Basic playback rate config options, closes #309 * [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:
@ -182,6 +182,20 @@ class TestSlide:
|
||||
with pytest.raises(ValidationError):
|
||||
self.next_slide()
|
||||
|
||||
@assert_constructs
|
||||
class TestPlaybackRate(Slide):
|
||||
def construct(self) -> None:
|
||||
text = Text("Some text")
|
||||
|
||||
self.add(text)
|
||||
|
||||
assert "playback_rate" not in self._pre_slide_config_kwargs
|
||||
|
||||
self.next_slide(playback_rate=2.0)
|
||||
self.play(text.animate.scale(2))
|
||||
|
||||
assert self._pre_slide_config_kwargs["playback_rate"] == 2.0
|
||||
|
||||
@assert_constructs
|
||||
class TestWipe(Slide):
|
||||
def construct(self) -> None:
|
||||
|
Reference in New Issue
Block a user