mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-05-17 18:55:53 +08:00
Compare commits
6 Commits
gui-scenes
...
v4.13.2
Author | SHA1 | Date | |
---|---|---|---|
6a96b3ab8c | |||
a1c041db80 | |||
4fd3452f95 | |||
ff2be6851b | |||
95289ee7a5 | |||
f1a026208a |
@ -1,5 +1,5 @@
|
||||
[bumpversion]
|
||||
current_version = 4.13.1
|
||||
current_version = 4.13.2
|
||||
commit = True
|
||||
message = chore(version): bump {current_version} to {new_version}
|
||||
|
||||
|
@ -12,7 +12,7 @@ repos:
|
||||
- id: isort
|
||||
name: isort (python)
|
||||
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
|
||||
rev: v2.8.0
|
||||
rev: v2.9.0
|
||||
hooks:
|
||||
- id: pretty-format-yaml
|
||||
args: [--autofix]
|
||||
@ -24,11 +24,11 @@ repos:
|
||||
hooks:
|
||||
- id: black
|
||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||
rev: v0.0.265
|
||||
rev: v0.0.269
|
||||
hooks:
|
||||
- id: ruff
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.2.0
|
||||
rev: v1.3.0
|
||||
hooks:
|
||||
- id: mypy
|
||||
additional_dependencies: [types-requests, types-setuptools]
|
||||
|
@ -66,6 +66,56 @@ Example using 3D camera. As Manim and ManimGL handle 3D differently, definitions
|
||||
:end-before: [manimgl-3d]
|
||||
```
|
||||
|
||||
## Subclass Custom Scenes
|
||||
|
||||
For compatibility reasons, Manim Slides only provides subclasses for
|
||||
`Scene` and `ThreeDScene`.
|
||||
However, subclassing other scene classes is totally possible,
|
||||
and very simple to do actually!
|
||||
|
||||
[For example](https://github.com/jeertmans/manim-slides/discussions/185),
|
||||
you can subclass the `MovingCameraScene` class from `manim`
|
||||
with the following code:
|
||||
|
||||
```{code-block} python
|
||||
:linenos:
|
||||
|
||||
from manim import *
|
||||
from manim_slides import Slide
|
||||
|
||||
|
||||
class MovingCameraSlide(Slide, MovingCameraScene):
|
||||
pass
|
||||
```
|
||||
|
||||
And later use this class anywhere in your code:
|
||||
|
||||
|
||||
```{code-block} python
|
||||
:linenos:
|
||||
|
||||
class SubclassExample(MovingCameraSlide):
|
||||
def construct(self):
|
||||
eq1 = MathTex("x", "=", "1")
|
||||
eq2 = MathTex("x", "=", "2")
|
||||
|
||||
self.play(Write(eq1))
|
||||
|
||||
self.next_slide()
|
||||
|
||||
self.play(
|
||||
TransformMatchingTex(eq1, eq2),
|
||||
self.camera.frame.animate.scale(0.5)
|
||||
)
|
||||
|
||||
self.wait()
|
||||
```
|
||||
|
||||
:::{note}
|
||||
If you do not plan to reuse `MovingCameraSlide` more than once, then you can
|
||||
directly write the `construct` method in the body of `MovingCameraSlide`.
|
||||
:::
|
||||
|
||||
## Advanced Example
|
||||
|
||||
A more advanced example is `ConvertExample`, which is used as demo slide and tutorial.
|
||||
|
@ -1 +1 @@
|
||||
__version__ = "4.13.1"
|
||||
__version__ = "4.13.2"
|
||||
|
@ -57,7 +57,7 @@ def verbosity_option(function: F) -> F:
|
||||
["PERF", "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
|
||||
case_sensitive=False,
|
||||
),
|
||||
help="Verbosity of CLI output",
|
||||
help="Verbosity of CLI output. PERF will log performances (timing) information.",
|
||||
default=None,
|
||||
expose_value=False,
|
||||
envvar="MANIM_SLIDES_VERBOSITY",
|
||||
|
@ -906,7 +906,7 @@ def start_at_callback(
|
||||
"-s",
|
||||
"--skip-all",
|
||||
is_flag=True,
|
||||
help="Skip all slides, useful the test if slides are working. Automatically sets `--skip-after-last-slide` to True.",
|
||||
help="Skip all slides, useful the test if slides are working. Automatically sets `--exit-after-last-slide` to True.",
|
||||
)
|
||||
@click.option(
|
||||
"-r",
|
||||
|
@ -59,7 +59,9 @@ evolved very little since its inception and does not work with ManimGL.
|
||||
In 2022, Manim Slides has been created from manim-presentation, with the aim
|
||||
to make it a more complete tool, better documented, and usable on all platforms
|
||||
and with ManimCE or ManimGL. After almost a year of existence, Manim Slides has
|
||||
evolved a lot, has built a small community of contributors, and continues to
|
||||
evolved a lot (see
|
||||
[comparison section](#comparison-with-manim-presentation)),
|
||||
has built a small community of contributors, and continues to
|
||||
provide new features on a regular basis.
|
||||
|
||||
# Easy to Use Commitment
|
||||
@ -133,6 +135,31 @@ share your slides, which we discuss on our
|
||||
[Sharing your slides](https://jeertmans.github.io/manim-slides/reference/sharing.html)
|
||||
page.
|
||||
|
||||
## Comparison with manim-presentation
|
||||
|
||||
Starting from [@manim-presentation]'s original work, Manim Slides now provides
|
||||
numerous additional features.
|
||||
A non-exhaustive list of those new features is as follows:
|
||||
|
||||
* ManimGL compatibility;
|
||||
* playing slides in reverse;
|
||||
* exporting slides to HTML and PowerPoint;
|
||||
* 3D scene support;
|
||||
* multiple key inputs can map to the same action
|
||||
(e.g., useful when using a pointer);
|
||||
* optionally hiding mouse cursor when presenting;
|
||||
* recording your presentation;
|
||||
* multiple video scaling methods (for speed-vs-quality tradeoff);
|
||||
* and automatic detection of some scene parameters
|
||||
(e.g., resolution or background color).
|
||||
|
||||
The complete and up-to-date set of features Manim Slide supports is
|
||||
available in the
|
||||
[online documentation](https://jeertmans.github.io/manim-slides/).
|
||||
For new feature requests, we highly encourage users to
|
||||
[create an issue](https://github.com/jeertmans/manim-slides/issues/new/choose)
|
||||
with the appropriate template.
|
||||
|
||||
# Acknowledgements
|
||||
|
||||
We acknowledge the work of [@manim-presentation] that paved the initial structure
|
||||
|
@ -43,7 +43,7 @@ packages = [
|
||||
]
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/jeertmans/manim-slides"
|
||||
version = "4.13.1"
|
||||
version = "4.13.2"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
click = "^8.1.3"
|
||||
|
Reference in New Issue
Block a user