Skip to content

Commit 026520c

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 380246e + 650d49c commit 026520c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+6966
-3889
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ jobs:
88
deploy:
99
runs-on: ubuntu-latest
1010

11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python: ["py37", "py38", "py39", "py310"]
15+
1116
steps:
1217
- uses: actions/checkout@v2
1318

@@ -20,11 +25,13 @@ jobs:
2025
run: |
2126
python -m pip install --upgrade pip
2227
pip install setuptools wheel twine build
23-
24-
- name: Build and publish
28+
29+
- name: Build wheels
30+
run: python setup.py bdist_wheel --python-tag ${{ matrix.python }}
31+
32+
- name: Upload wheels
2533
env:
2634
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
2735
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
2836
run: |
29-
python -m build
3037
twine upload dist/*

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212

1313
Manim is an engine for precise programmatic animations, designed for creating explanatory math videos.
1414

15-
Note, there are two versions of manim. This repository began as a personal project by the author of [3Blue1Brown](https://www.3blue1brown.com/) for the purpose of animating those videos, with video-specific code available [here](https://github.com/3b1b/videos). In 2020 a group of developers forked it into what is now the [community edition](https://github.com/ManimCommunity/manim/), with a goal of being more stable, better tested, quicker to respond to community contributions, and all around friendlier to get started with. See [this page](https://docs.manim.community/en/stable/installation/versions.html?highlight=OpenGL#which-version-to-use) for more details.
15+
Note, there are two versions of manim. This repository began as a personal project by the author of [3Blue1Brown](https://www.3blue1brown.com/) for the purpose of animating those videos, with video-specific code available [here](https://github.com/3b1b/videos). In 2020 a group of developers forked it into what is now the [community edition](https://github.com/ManimCommunity/manim/), with a goal of being more stable, better tested, quicker to respond to community contributions, and all around friendlier to get started with. See [this page](https://docs.manim.community/en/stable/faq/installation.html#different-versions) for more details.
1616

1717
## Installation
1818
> **WARNING:** These instructions are for ManimGL _only_. Trying to use these instructions to install [ManimCommunity/manim](https://github.com/ManimCommunity/manim) or instructions there to install this version will cause problems. You should first decide which version you wish to install, then only follow the instructions for your desired version.
1919
>
2020
> **Note**: To install manim directly through pip, please pay attention to the name of the installed package. This repository is ManimGL of 3b1b. The package name is `manimgl` instead of `manim` or `manimlib`. Please use `pip install manimgl` to install the version in this repository.
2121
22-
Manim runs on Python 3.6 or higher (Python 3.8 is recommended).
22+
Manim runs on Python 3.7 or higher.
2323

2424
System requirements are [FFmpeg](https://ffmpeg.org/), [OpenGL](https://www.opengl.org/) and [LaTeX](https://www.latex-project.org) (optional, if you want to use LaTeX).
2525
For Linux, [Pango](https://pango.gnome.org) along with its development headers are required. See instruction [here](https://github.com/ManimCommunity/ManimPango#building).

docs/source/development/changelog.rst

Lines changed: 321 additions & 86 deletions
Large diffs are not rendered by default.

docs/source/documentation/constants.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Frame and pixel shape
1818
1919
DEFAULT_PIXEL_HEIGHT = 1080
2020
DEFAULT_PIXEL_WIDTH = 1920
21-
DEFAULT_FRAME_RATE = 30
21+
DEFAULT_FPS = 30
2222
2323
Buffs
2424
-----
@@ -84,8 +84,6 @@ Text
8484

8585
.. code-block:: python
8686
87-
START_X = 30
88-
START_Y = 20
8987
NORMAL = "NORMAL"
9088
ITALIC = "ITALIC"
9189
OBLIQUE = "OBLIQUE"

docs/source/documentation/custom_config.rst

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ Import line that need to execute when entering interactive mode directly.
9898
- ``font``
9999
Default font of Text
100100

101+
- ``text_alignment``
102+
Default text alignment for LaTeX
103+
101104
- ``background_color``
102105
Default background color
103106

@@ -113,6 +116,11 @@ means left(L) / middle(O) / right(R)).
113116

114117
The number of the monitor you want the preview window to pop up on. (default is 0)
115118

119+
``full_screen``
120+
---------------
121+
122+
Whether open the window in full screen. (default is false)
123+
116124
``break_into_partial_movies``
117125
-----------------------------
118126

@@ -123,22 +131,27 @@ to form the full scene.
123131
Sometimes video-editing is made easier when working with the broken up scene, which
124132
effectively has cuts at all the places you might want.
125133

126-
``camera_qualities``
127-
--------------------
134+
``camera_resolutions``
135+
----------------------
128136

129-
Export quality
137+
Export resolutions
130138

131139
- ``low``
132-
Low quality (default is 480p15)
140+
Low resolutions (default is 480p)
133141

134142
- ``medium``
135-
Medium quality (default is 720p30)
143+
Medium resolutions (default is 720p)
136144

137145
- ``high``
138-
High quality (default is 1080p30)
146+
High resolutions (default is 1080p)
139147

140148
- ``ultra_high``
141-
Ultra high quality (default is 4K60)
149+
Ultra high resolutions (default is 4K)
150+
151+
- ``default_resolutions``
152+
Default resolutions (one of the above four, default is high)
153+
154+
``fps``
155+
-------
142156

143-
- ``default_quality``
144-
Default quality (one of the above four)
157+
Export frame rate. (default is 30)

docs/source/getting_started/configuration.rst

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,21 @@ Some useful flags
3232
All supported flags
3333
^^^^^^^^^^^^^^^^^^^
3434

35-
========================================================== ====== =================================================================================================================================================================================================
35+
========================================================== ====== =====================================================================================================================================================================================================
3636
flag abbr function
37-
========================================================== ====== =================================================================================================================================================================================================
37+
========================================================== ====== =====================================================================================================================================================================================================
3838
``--help`` ``-h`` Show the help message and exit
39+
``--version`` ``-v`` Display the version of manimgl
3940
``--write_file`` ``-w`` Render the scene as a movie file
4041
``--skip_animations`` ``-s`` Skip to the last frame
4142
``--low_quality`` ``-l`` Render at a low quality (for faster rendering)
4243
``--medium_quality`` ``-m`` Render at a medium quality
4344
``--hd`` Render at a 1080p quality
4445
``--uhd`` Render at a 4k quality
4546
``--full_screen`` ``-f`` Show window in full screen
47+
``--presenter_mode`` ``-p`` Scene will stay paused during wait calls until space bar or right arrow is hit, like a slide show
4648
``--save_pngs`` ``-g`` Save each frame as a png
47-
``--save_as_gif`` ``-i`` Save the video as gif
49+
``--gif`` ``-i`` Save the video as gif
4850
``--transparent`` ``-t`` Render to a movie file with an alpha channel
4951
``--quiet`` ``-q``
5052
``--write_all`` ``-a`` Write all the scenes from a file
@@ -53,14 +55,15 @@ flag abbr function
5355
``--config`` Guide for automatic configuration
5456
``--file_name FILE_NAME`` Name for the movie or image file
5557
``--start_at_animation_number START_AT_ANIMATION_NUMBER`` ``-n`` Start rendering not from the first animation, but from another, specified by its index. If you passing two comma separated values, e.g. "3,6", it will end the rendering at the second value.
56-
``--embed LINENO`` ``-e`` Takes a line number as an argument, and results in the scene being called as if the line ``self.embed()`` was inserted into the scene code at that line number
58+
``--embed [EMBED]`` ``-e`` Creates a new file where the line ``self.embed`` is inserted into the Scenes construct method. If a string is passed in, the line will be inserted below the last line of code including that string.
5759
``--resolution RESOLUTION`` ``-r`` Resolution, passed as "WxH", e.g. "1920x1080"
58-
``--frame_rate FRAME_RATE`` Frame rate, as an integer
60+
``--fps FPS`` Frame rate, as an integer
5961
``--color COLOR`` ``-c`` Background color
6062
``--leave_progress_bars`` Leave progress bars displayed in terminal
61-
``--video_dir VIDEO_DIR`` directory to write video
63+
``--video_dir VIDEO_DIR`` Directory to write video
6264
``--config_file CONFIG_FILE`` Path to the custom configuration file
63-
========================================================== ====== =================================================================================================================================================================================================
65+
``--log-level LOG_LEVEL`` Level of messages to Display, can be DEBUG / INFO / WARNING / ERROR / CRITICAL
66+
========================================================== ====== =====================================================================================================================================================================================================
6467

6568
custom_config
6669
--------------

docs/source/getting_started/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Installation
22
============
33

4-
Manim runs on Python 3.6 or higher (Python 3.8 is recommended).
4+
Manim runs on Python 3.7 or higher.
55

66
System requirements are:
77

example_scenes.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ def construct(self):
7777
# ".animate" syntax:
7878
self.play(grid.animate.shift(LEFT))
7979

80-
# Alternatively, you can use the older syntax by passing the
81-
# method and then the arguments to the scene's "play" function:
82-
self.play(grid.shift, LEFT)
83-
8480
# Both of those will interpolate between the mobject's initial
8581
# state and whatever happens when you apply that method.
8682
# For this example, calling grid.shift(LEFT) would shift the
@@ -274,7 +270,7 @@ def construct(self):
274270
square = Square()
275271
square.set_fill(BLUE_E, 1)
276272

277-
# On all all frames, the constructor Brace(square, UP) will
273+
# On all frames, the constructor Brace(square, UP) will
278274
# be called, and the mobject brace will set its data to match
279275
# that of the newly constructed object
280276
brace = always_redraw(Brace, square, UP)
@@ -579,7 +575,7 @@ def construct(self):
579575
self.play(light.animate.move_to(3 * IN), run_time=5)
580576
self.play(light.animate.shift(10 * OUT), run_time=5)
581577

582-
drag_text = Text("Try moving the mouse while pressing d or s")
578+
drag_text = Text("Try moving the mouse while pressing d or f")
583579
drag_text.move_to(light_text)
584580
drag_text.fix_in_frame()
585581

@@ -650,7 +646,7 @@ def construct(self):
650646

651647
def text_updater(old_text):
652648
assert(isinstance(old_text, Text))
653-
new_text = Text(self.textbox.get_value(), size=old_text.size)
649+
new_text = Text(self.textbox.get_value(), font_size=old_text.font_size)
654650
# new_text.align_data_and_family(old_text)
655651
new_text.move_to(old_text)
656652
if self.checkbox.get_value():

manimlib/__init__.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
from manimlib.constants import *
66

7+
from manimlib.window import *
8+
79
from manimlib.animation.animation import *
810
from manimlib.animation.composition import *
911
from manimlib.animation.creation import *
@@ -20,37 +22,37 @@
2022

2123
from manimlib.camera.camera import *
2224

23-
from manimlib.window import *
24-
2525
from manimlib.mobject.boolean_ops import *
26-
from manimlib.mobject.coordinate_systems import *
2726
from manimlib.mobject.changing import *
27+
from manimlib.mobject.coordinate_systems import *
2828
from manimlib.mobject.frame import *
2929
from manimlib.mobject.functions import *
3030
from manimlib.mobject.geometry import *
3131
from manimlib.mobject.interactive import *
3232
from manimlib.mobject.matrix import *
3333
from manimlib.mobject.mobject import *
34+
from manimlib.mobject.mobject_update_utils import *
3435
from manimlib.mobject.number_line import *
3536
from manimlib.mobject.numbers import *
3637
from manimlib.mobject.probability import *
3738
from manimlib.mobject.shape_matchers import *
3839
from manimlib.mobject.svg.brace import *
3940
from manimlib.mobject.svg.drawings import *
4041
from manimlib.mobject.svg.mtex_mobject import *
42+
from manimlib.mobject.svg.string_mobject import *
4143
from manimlib.mobject.svg.svg_mobject import *
4244
from manimlib.mobject.svg.tex_mobject import *
4345
from manimlib.mobject.svg.text_mobject import *
4446
from manimlib.mobject.three_dimensions import *
47+
from manimlib.mobject.types.dot_cloud import *
4548
from manimlib.mobject.types.image_mobject import *
4649
from manimlib.mobject.types.point_cloud_mobject import *
4750
from manimlib.mobject.types.surface import *
4851
from manimlib.mobject.types.vectorized_mobject import *
49-
from manimlib.mobject.types.dot_cloud import *
50-
from manimlib.mobject.mobject_update_utils import *
5152
from manimlib.mobject.value_tracker import *
5253
from manimlib.mobject.vector_field import *
5354

55+
from manimlib.scene.interactive_scene import *
5456
from manimlib.scene.scene import *
5557
from manimlib.scene.three_d_scene import *
5658

@@ -60,12 +62,11 @@
6062
from manimlib.utils.customization import *
6163
from manimlib.utils.debug import *
6264
from manimlib.utils.directories import *
65+
from manimlib.utils.file_ops import *
6366
from manimlib.utils.images import *
6467
from manimlib.utils.iterables import *
65-
from manimlib.utils.file_ops import *
6668
from manimlib.utils.paths import *
6769
from manimlib.utils.rate_functions import *
6870
from manimlib.utils.simple_functions import *
6971
from manimlib.utils.sounds import *
7072
from manimlib.utils.space_ops import *
71-
from manimlib.utils.strings import *

manimlib/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env python
2+
from manimlib import __version__
23
import manimlib.config
3-
import manimlib.logger
44
import manimlib.extract_scene
5+
import manimlib.logger
56
import manimlib.utils.init_config
6-
from manimlib import __version__
77

88

99
def main():

0 commit comments

Comments
 (0)