Skip to content

Commit 25f271c

Browse files
committed
Merge branch 'master' into startistics
2 parents 97b32b1 + 5395130 commit 25f271c

36 files changed

+567
-208
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
python: ["py37", "py38", "py39", "py310"]
1515

1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v6
1818

1919
- name: Set up Python
20-
uses: actions/setup-python@v2
20+
uses: actions/setup-python@v6
2121
with:
2222
python-version: '3.8'
2323

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,4 @@ dmypy.json
152152
/videos
153153
/custom_config.yml
154154
test.py
155+
CLAUDE.md

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ manim-render example_scenes.py OpeningManimExample
6969
```sh
7070
brew install ffmpeg mactex
7171
```
72+
<details>
73+
<summary>💡 An alternative to heavyweight MacTeX bundle.</summary>
74+
75+
> To avoid installing the full MacTeX bundle, which is ~6GB, you can alternatively install the
76+
> lightweight [BasicTeX](https://formulae.brew.sh/cask/basictex) and then gradually add
77+
> only the LaTeX packages you actually need. A list of packages sufficient to run examples can
78+
> be found [here](https://github.com/3b1b/manim/issues/2133#issuecomment-2414547866).
79+
> For an overview of the MacTeX installer bundles, see https://www.tug.org/mactex/.
80+
</details>
7281

7382
2. If you are using an ARM-based processor, install Cairo.
7483
```sh
@@ -86,7 +95,7 @@ manim-render example_scenes.py OpeningManimExample
8695
## Anaconda Install
8796

8897
1. Install LaTeX as above.
89-
2. Create a conda environment using `conda create -n manim python=3.8`.
98+
2. Create a conda environment using `conda create -n manim python=3.9`.
9099
3. Activate the environment using `conda activate manim`.
91100
4. Install manimgl using `pip install -e .`.
92101

docs/source/getting_started/example_scenes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ CoordinateSystemExample
426426
# you can call call axes.coords_to_point, abbreviated to
427427
# axes.c2p, to associate a set of coordinates with a point,
428428
# like so:
429-
dot = Dot(color=RED)
429+
dot = Dot(fill_color=RED)
430430
dot.move_to(axes.c2p(0, 0))
431431
self.play(FadeIn(dot, scale=0.5))
432432
self.play(dot.animate.move_to(axes.c2p(3, 2)))
@@ -537,7 +537,7 @@ GraphExample
537537

538538
# You can use axes.input_to_graph_point, abbreviated
539539
# to axes.i2gp, to find a particular point on a graph
540-
dot = Dot(color=RED)
540+
dot = Dot(fill_color=RED)
541541
dot.move_to(axes.i2gp(2, parabola))
542542
self.play(FadeIn(dot, scale=0.5))
543543

example_scenes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def construct(self):
381381
# you can call call axes.coords_to_point, abbreviated to
382382
# axes.c2p, to associate a set of coordinates with a point,
383383
# like so:
384-
dot = Dot(color=RED)
384+
dot = Dot(fill_color=RED)
385385
dot.move_to(axes.c2p(0, 0))
386386
self.play(FadeIn(dot, scale=0.5))
387387
self.play(dot.animate.move_to(axes.c2p(3, 2)))
@@ -486,7 +486,7 @@ def construct(self):
486486

487487
# You can use axes.input_to_graph_point, abbreviated
488488
# to axes.i2gp, to find a particular point on a graph
489-
dot = Dot(color=RED)
489+
dot = Dot(fill_color=RED)
490490
dot.move_to(axes.i2gp(2, parabola))
491491
self.play(FadeIn(dot, scale=0.5))
492492

manimlib/__init__.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
import pkg_resources
1+
try:
2+
from importlib.metadata import version, PackageNotFoundError
3+
except ImportError: # For Python <3.8 fallback
4+
from importlib_metadata import version, PackageNotFoundError # type: ignore
5+
6+
try:
7+
__version__ = version("manimgl")
8+
except PackageNotFoundError:
9+
__version__ = "unknown"
210

3-
__version__ = pkg_resources.get_distribution("manimgl").version
411

512
from typing import TYPE_CHECKING
613

manimlib/animation/creation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ def __init__(self, mobject: Mobject, should_match_start: bool = False, **kwargs)
3232

3333
def interpolate_submobject(
3434
self,
35-
submob: VMobject,
36-
start_submob: VMobject,
35+
submob: Mobject,
36+
start_submob: Mobject,
3737
alpha: float
3838
) -> None:
3939
submob.pointwise_become_partial(

manimlib/animation/transform_matching_parts.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def add_transform(
8888
if not source_is_new or not target_is_new:
8989
return
9090

91-
transform_type = self.mismatch_animation
91+
transform_type = self.mismatch_animation
9292
if source.has_same_shape_as(target):
9393
transform_type = self.match_animation
9494

@@ -154,16 +154,16 @@ def matching_blocks(
154154
counts2 = list(map(target.substr_to_path_count, syms2))
155155

156156
# Start with user specified matches
157-
blocks = [(source[key], target[key]) for key in matched_keys]
158-
blocks += [(source[key1], target[key2]) for key1, key2 in key_map.items()]
157+
blocks = [(source[key1], target[key2]) for key1, key2 in key_map.items()]
158+
blocks += [(source[key], target[key]) for key in matched_keys]
159159

160160
# Nullify any intersections with those matches in the two symbol lists
161161
for sub_source, sub_target in blocks:
162162
for i in range(len(syms1)):
163-
if source[i] in sub_source.family_members_with_points():
163+
if i < len(source) and source[i] in sub_source.family_members_with_points():
164164
syms1[i] = "Null1"
165165
for j in range(len(syms2)):
166-
if target[j] in sub_target.family_members_with_points():
166+
if j < len(target) and target[j] in sub_target.family_members_with_points():
167167
syms2[j] = "Null2"
168168

169169
# Group together longest matching substrings

manimlib/animation/update.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ def __init__(
4646
super().__init__(mobject, suspend_mobject_updating=suspend_mobject_updating, **kwargs)
4747

4848
def interpolate_mobject(self, alpha: float) -> None:
49-
self.update_function(self.mobject, alpha)
49+
true_alpha = self.rate_func(self.time_spanned_alpha(alpha))
50+
self.update_function(self.mobject, true_alpha)
5051

5152

5253
class MaintainPositionRelativeTo(Animation):

manimlib/config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,6 @@ def get_output_directory(args: Namespace, config: Dict) -> str:
386386
out_dir = args.video_dir or dir_config.output
387387
if dir_config.mirror_module_path and args.file:
388388
file_path = Path(args.file).absolute()
389-
print(file_path)
390-
print(dir_config.removed_mirror_prefix)
391389
if str(file_path).startswith(dir_config.removed_mirror_prefix):
392390
rel_path = file_path.relative_to(dir_config.removed_mirror_prefix)
393391
rel_path = Path(str(rel_path).lstrip("_"))

0 commit comments

Comments
 (0)