mirror of
https://github.com/3b1b/manim.git
synced 2025-07-28 12:32:36 +08:00
Add travis job to publish on PyPI.
Also moved some shortcuts into manimlib, to be able to use it without the big_ol_pile_of_manim_imports script. Updated the README to explain installation via pip
This commit is contained in:
@ -15,3 +15,10 @@ before_script:
|
|||||||
- flake8 manimlib/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
- flake8 manimlib/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||||
script:
|
script:
|
||||||
- true # add other tests here
|
- true # add other tests here
|
||||||
|
publish:
|
||||||
|
provider: pypi
|
||||||
|
user: swegener
|
||||||
|
on:
|
||||||
|
tags: true
|
||||||
|
password:
|
||||||
|
secure: ONfT0jmsqfoYzxg6U7o0tRRxK9pa7dEhN4LS79Li1+ZjJx5zw+aQMzGwSteFmZSnLEzGM1fldXbr18VOKxtjL+TYt8c/FvsZAoWVhabDesh1coO/Jp22LTXc7G9jHXef2Q8RInhyUdwVFopySv5xBgWUXZAVK8wabVbbxhqQyHUbM4Ag1lvHPIAylTPCeYptVhBUNM5Q6E7D4BnmScOM5eo/H8t3QGCDh0SNKjw9hD8ySBEFREwu+IBnu8c8ZIqcdFb8VYA0tccsMBSlTOLsVnxmMfHyZWmZb83NAO6cwZknoMPntRzTpF1Gk9cWrfMU0eHMymaqMACPxGgfyCiBx/VSP/5fCx7DQK7ZVygsiq3CuKD5PqyplDqqwpvfHQ/U+MLUedJqIINi6P1yHZLUF+cP/KYsWHz9vMumoGxQ5IuF8kUgmTl5e0mrYG9cKEVmgtPI+WBjVM1ZY9nkGf1t0SBptZT+cLoPi92+m5+QlPLc/6+cOvMBuU+vUYRqRTJpnXRs6CZcbtIAO9GKPrDAcLRpX7MMvkDnG4dLapX4Lig3BFH9hCXnsBtNXz+qc7qnG8HJqZ2Acv0GuFYUn5qFirUXIsmVotFCh9lqVX47L8hl5bZYeY8/g3wXPOhZ5np2XSKztun8kq2Wnz0TLwxNTC4InPGr9jFp01QK08ihtw8=
|
||||||
|
34
README.md
34
README.md
@ -6,12 +6,26 @@
|
|||||||
Manim is an animation engine for explanatory math videos. It's used to create precise animations programmatically, as seen in the videos at [3Blue1Brown](https://www.3blue1brown.com/).
|
Manim is an animation engine for explanatory math videos. It's used to create precise animations programmatically, as seen in the videos at [3Blue1Brown](https://www.3blue1brown.com/).
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
Manim runs on python 3.7. You can install the Python requirements with
|
Manim runs on python 3.7. You can install it from PyPI via pip
|
||||||
`python3 -m pip install -r requirements.txt`. System requirements are
|
|
||||||
[cairo](https://www.cairographics.org), [ffmpeg](https://www.ffmpeg.org), [sox](http://sox.sourceforge.net), [latex](https://www.latex-project.org) (optional, if you want to use LaTeX).
|
```sh
|
||||||
|
pip3 install manimlib
|
||||||
|
```
|
||||||
|
|
||||||
|
System requirements are [cairo](https://www.cairographics.org), [ffmpeg](https://www.ffmpeg.org), [sox](http://sox.sourceforge.net), [latex](https://www.latex-project.org) (optional, if you want to use LaTeX).
|
||||||
|
|
||||||
|
You can now use it via the `manim` command. For example:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
manim my_project.py MyScene
|
||||||
|
```
|
||||||
|
|
||||||
|
For more options, take a look at the “Using manim“ sections further below.
|
||||||
|
|
||||||
### Directly
|
### Directly
|
||||||
Clone this repository and in that directory execute:
|
|
||||||
|
If you want to hack on manimlib itself, clone this repository and in that directory execute:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Install python requirements
|
# Install python requirements
|
||||||
python3 -m pip install -r requirements.txt
|
python3 -m pip install -r requirements.txt
|
||||||
@ -20,18 +34,6 @@ python3 -m pip install -r requirements.txt
|
|||||||
python3 -m manim example_scenes.py SquareToCircle -pl
|
python3 -m manim example_scenes.py SquareToCircle -pl
|
||||||
```
|
```
|
||||||
|
|
||||||
### Installing into your system
|
|
||||||
For the previous "direct" method you always have to have this git repository. alternatively you can install it permanently in your system and run it on your own scene files:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
# Inside repository - Install manim (also installs Python requirements)
|
|
||||||
python3 -m pip install .
|
|
||||||
|
|
||||||
# Now you don't need the repository anymore and can run it in other directories
|
|
||||||
cd anywhere
|
|
||||||
manim.py example_scenes.py SquareToCircle -pl
|
|
||||||
```
|
|
||||||
|
|
||||||
### Directly (Windows)
|
### Directly (Windows)
|
||||||
1. [Install FFmpeg](https://www.wikihow.com/Install-FFmpeg-on-Windows).
|
1. [Install FFmpeg](https://www.wikihow.com/Install-FFmpeg-on-Windows).
|
||||||
2. Install Cairo. Download the wheel from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycairo. For most users, ``pycairo‑1.18.0‑cp37‑cp37m‑win32.whl`` will do fine.
|
2. Install Cairo. Download the wheel from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycairo. For most users, ``pycairo‑1.18.0‑cp37‑cp37m‑win32.whl`` will do fine.
|
||||||
|
14
manim.py
14
manim.py
@ -1,17 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import manimlib.config
|
import manimlib
|
||||||
import manimlib.extract_scene
|
|
||||||
import manimlib.stream_starter
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
args = manimlib.config.parse_cli()
|
manimlib.main()
|
||||||
if not args.livestream:
|
|
||||||
config = manimlib.config.get_configuration(args)
|
|
||||||
manimlib.extract_scene.main(config)
|
|
||||||
else:
|
|
||||||
manimlib.stream_starter.start_livestream(
|
|
||||||
to_twitch=args.to_twitch,
|
|
||||||
twitch_key=args.twitch_key,
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
manimlib.stream_starter.start_livestream()
|
manimlib.stream_starter.start_livestream()
|
||||||
|
16
manimlib/__init__.py
Normal file
16
manimlib/__init__.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
import manimlib.config
|
||||||
|
import manimlib.extract_scene
|
||||||
|
import manimlib.stream_starter
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
args = manimlib.config.parse_cli()
|
||||||
|
if not args.livestream:
|
||||||
|
config = manimlib.config.get_configuration(args)
|
||||||
|
manimlib.extract_scene.main(config)
|
||||||
|
else:
|
||||||
|
manimlib.stream_starter.start_livestream(
|
||||||
|
to_twitch=args.to_twitch,
|
||||||
|
twitch_key=args.twitch_key,
|
||||||
|
)
|
@ -13,88 +13,13 @@ Note: One should NOT import from this file for main library code, it is meant on
|
|||||||
as a convenience for scripts creating scenes for videos.
|
as a convenience for scripts creating scenes for videos.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from manimlib.shortcuts import *
|
||||||
from manimlib.constants import *
|
|
||||||
|
|
||||||
from manimlib.animation.animation import *
|
|
||||||
from manimlib.animation.composition import *
|
|
||||||
from manimlib.animation.creation import *
|
|
||||||
from manimlib.animation.fading import *
|
|
||||||
from manimlib.animation.growing import *
|
|
||||||
from manimlib.animation.indication import *
|
|
||||||
from manimlib.animation.movement import *
|
|
||||||
from manimlib.animation.numbers import *
|
|
||||||
from manimlib.animation.rotation import *
|
|
||||||
from manimlib.animation.specialized import *
|
|
||||||
from manimlib.animation.transform import *
|
|
||||||
from manimlib.animation.update import *
|
|
||||||
|
|
||||||
from manimlib.camera.camera import *
|
|
||||||
from manimlib.camera.mapping_camera import *
|
|
||||||
from manimlib.camera.moving_camera import *
|
|
||||||
from manimlib.camera.three_d_camera import *
|
|
||||||
|
|
||||||
from manimlib.mobject.coordinate_systems import *
|
|
||||||
from manimlib.mobject.changing import *
|
|
||||||
from manimlib.mobject.frame import *
|
|
||||||
from manimlib.mobject.functions import *
|
|
||||||
from manimlib.mobject.geometry import *
|
|
||||||
from manimlib.mobject.matrix import *
|
|
||||||
from manimlib.mobject.mobject import *
|
|
||||||
from manimlib.mobject.number_line import *
|
|
||||||
from manimlib.mobject.numbers import *
|
|
||||||
from manimlib.mobject.probability import *
|
|
||||||
from manimlib.mobject.shape_matchers import *
|
|
||||||
from manimlib.mobject.svg.brace import *
|
|
||||||
from manimlib.mobject.svg.drawings import *
|
|
||||||
from manimlib.mobject.svg.svg_mobject import *
|
|
||||||
from manimlib.mobject.svg.tex_mobject import *
|
|
||||||
from manimlib.mobject.three_d_utils import *
|
|
||||||
from manimlib.mobject.three_dimensions import *
|
|
||||||
from manimlib.mobject.types.image_mobject import *
|
|
||||||
from manimlib.mobject.types.point_cloud_mobject import *
|
|
||||||
from manimlib.mobject.types.vectorized_mobject import *
|
|
||||||
from manimlib.mobject.mobject_update_utils import *
|
|
||||||
from manimlib.mobject.value_tracker import *
|
|
||||||
from manimlib.mobject.vector_field import *
|
|
||||||
|
|
||||||
from manimlib.for_3b1b_videos.common_scenes import *
|
from manimlib.for_3b1b_videos.common_scenes import *
|
||||||
from manimlib.for_3b1b_videos.pi_creature import *
|
from manimlib.for_3b1b_videos.pi_creature import *
|
||||||
from manimlib.for_3b1b_videos.pi_creature_animations import *
|
from manimlib.for_3b1b_videos.pi_creature_animations import *
|
||||||
from manimlib.for_3b1b_videos.pi_creature_scene import *
|
from manimlib.for_3b1b_videos.pi_creature_scene import *
|
||||||
|
|
||||||
from manimlib.once_useful_constructs.arithmetic import *
|
|
||||||
from manimlib.once_useful_constructs.combinatorics import *
|
|
||||||
from manimlib.once_useful_constructs.complex_transformation_scene import *
|
|
||||||
from manimlib.once_useful_constructs.counting import *
|
|
||||||
from manimlib.once_useful_constructs.fractals import *
|
|
||||||
from manimlib.once_useful_constructs.graph_theory import *
|
|
||||||
from manimlib.once_useful_constructs.light import *
|
|
||||||
|
|
||||||
from manimlib.scene.graph_scene import *
|
|
||||||
from manimlib.scene.moving_camera_scene import *
|
|
||||||
from manimlib.scene.reconfigurable_scene import *
|
|
||||||
from manimlib.scene.scene import *
|
|
||||||
from manimlib.scene.sample_space_scene import *
|
|
||||||
from manimlib.scene.graph_scene import *
|
|
||||||
from manimlib.scene.scene_from_video import *
|
|
||||||
from manimlib.scene.three_d_scene import *
|
|
||||||
from manimlib.scene.vector_space_scene import *
|
|
||||||
from manimlib.scene.zoomed_scene import *
|
|
||||||
|
|
||||||
from manimlib.utils.bezier import *
|
|
||||||
from manimlib.utils.color import *
|
|
||||||
from manimlib.utils.config_ops import *
|
|
||||||
from manimlib.utils.images import *
|
|
||||||
from manimlib.utils.iterables import *
|
|
||||||
from manimlib.utils.file_ops import *
|
|
||||||
from manimlib.utils.paths import *
|
|
||||||
from manimlib.utils.rate_functions import *
|
|
||||||
from manimlib.utils.simple_functions import *
|
|
||||||
from manimlib.utils.sounds import *
|
|
||||||
from manimlib.utils.space_ops import *
|
|
||||||
from manimlib.utils.strings import *
|
|
||||||
|
|
||||||
# Non manim libraries that are also nice to have without thinking
|
# Non manim libraries that are also nice to have without thinking
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
|
75
manimlib/shortcuts.py
Normal file
75
manimlib/shortcuts.py
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
from manimlib.constants import *
|
||||||
|
|
||||||
|
from manimlib.animation.animation import *
|
||||||
|
from manimlib.animation.composition import *
|
||||||
|
from manimlib.animation.creation import *
|
||||||
|
from manimlib.animation.fading import *
|
||||||
|
from manimlib.animation.growing import *
|
||||||
|
from manimlib.animation.indication import *
|
||||||
|
from manimlib.animation.movement import *
|
||||||
|
from manimlib.animation.numbers import *
|
||||||
|
from manimlib.animation.rotation import *
|
||||||
|
from manimlib.animation.specialized import *
|
||||||
|
from manimlib.animation.transform import *
|
||||||
|
from manimlib.animation.update import *
|
||||||
|
|
||||||
|
from manimlib.camera.camera import *
|
||||||
|
from manimlib.camera.mapping_camera import *
|
||||||
|
from manimlib.camera.moving_camera import *
|
||||||
|
from manimlib.camera.three_d_camera import *
|
||||||
|
|
||||||
|
from manimlib.mobject.coordinate_systems import *
|
||||||
|
from manimlib.mobject.changing import *
|
||||||
|
from manimlib.mobject.frame import *
|
||||||
|
from manimlib.mobject.functions import *
|
||||||
|
from manimlib.mobject.geometry import *
|
||||||
|
from manimlib.mobject.matrix import *
|
||||||
|
from manimlib.mobject.mobject import *
|
||||||
|
from manimlib.mobject.number_line import *
|
||||||
|
from manimlib.mobject.numbers import *
|
||||||
|
from manimlib.mobject.probability import *
|
||||||
|
from manimlib.mobject.shape_matchers import *
|
||||||
|
from manimlib.mobject.svg.brace import *
|
||||||
|
from manimlib.mobject.svg.drawings import *
|
||||||
|
from manimlib.mobject.svg.svg_mobject import *
|
||||||
|
from manimlib.mobject.svg.tex_mobject import *
|
||||||
|
from manimlib.mobject.three_d_utils import *
|
||||||
|
from manimlib.mobject.three_dimensions import *
|
||||||
|
from manimlib.mobject.types.image_mobject import *
|
||||||
|
from manimlib.mobject.types.point_cloud_mobject import *
|
||||||
|
from manimlib.mobject.types.vectorized_mobject import *
|
||||||
|
from manimlib.mobject.mobject_update_utils import *
|
||||||
|
from manimlib.mobject.value_tracker import *
|
||||||
|
from manimlib.mobject.vector_field import *
|
||||||
|
|
||||||
|
from manimlib.once_useful_constructs.arithmetic import *
|
||||||
|
from manimlib.once_useful_constructs.combinatorics import *
|
||||||
|
from manimlib.once_useful_constructs.complex_transformation_scene import *
|
||||||
|
from manimlib.once_useful_constructs.counting import *
|
||||||
|
from manimlib.once_useful_constructs.fractals import *
|
||||||
|
from manimlib.once_useful_constructs.graph_theory import *
|
||||||
|
from manimlib.once_useful_constructs.light import *
|
||||||
|
|
||||||
|
from manimlib.scene.graph_scene import *
|
||||||
|
from manimlib.scene.moving_camera_scene import *
|
||||||
|
from manimlib.scene.reconfigurable_scene import *
|
||||||
|
from manimlib.scene.scene import *
|
||||||
|
from manimlib.scene.sample_space_scene import *
|
||||||
|
from manimlib.scene.graph_scene import *
|
||||||
|
from manimlib.scene.scene_from_video import *
|
||||||
|
from manimlib.scene.three_d_scene import *
|
||||||
|
from manimlib.scene.vector_space_scene import *
|
||||||
|
from manimlib.scene.zoomed_scene import *
|
||||||
|
|
||||||
|
from manimlib.utils.bezier import *
|
||||||
|
from manimlib.utils.color import *
|
||||||
|
from manimlib.utils.config_ops import *
|
||||||
|
from manimlib.utils.images import *
|
||||||
|
from manimlib.utils.iterables import *
|
||||||
|
from manimlib.utils.file_ops import *
|
||||||
|
from manimlib.utils.paths import *
|
||||||
|
from manimlib.utils.rate_functions import *
|
||||||
|
from manimlib.utils.simple_functions import *
|
||||||
|
from manimlib.utils.sounds import *
|
||||||
|
from manimlib.utils.space_ops import *
|
||||||
|
from manimlib.utils.strings import *
|
@ -1,5 +1,5 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = manim
|
name = manimlib
|
||||||
author = Grant Sanderson
|
author = Grant Sanderson
|
||||||
author-email= grant@3blue1brown.com
|
author-email= grant@3blue1brown.com
|
||||||
summary = Animation engine for explanatory math videos
|
summary = Animation engine for explanatory math videos
|
||||||
@ -13,4 +13,8 @@ project_urls =
|
|||||||
license = MIT
|
license = MIT
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
packages = manimlib
|
packages = manimlib
|
||||||
|
|
||||||
|
[entry_points]
|
||||||
|
console_scripts =
|
||||||
|
manim = manimlib:main
|
Reference in New Issue
Block a user