Skip to content

Commit 80b1b3d

Browse files
committed
Merge branch 'main' of https://github.com/ManimCommunity/manim into optimized_vmobject_points
2 parents 4e30041 + 88836df commit 80b1b3d

Some content is hidden

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

74 files changed

+5391
-1755
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
uses: teatimeguest/setup-texlive-action@v2
6969
with:
7070
cache: true
71-
packages: scheme-basic fontspec inputenc fontenc tipa mathrsfs calligra xcolor standalone preview doublestroke ms everysel setspace rsfs relsize ragged2e fundus-calligra microtype wasysym physics dvisvgm jknapltx wasy cm-super babel-english gnu-freefont mathastext cbfonts-fd
71+
packages: scheme-basic fontspec inputenc fontenc tipa mathrsfs calligra xcolor standalone preview doublestroke ms everysel setspace rsfs relsize ragged2e fundus-calligra microtype wasysym physics dvisvgm jknapltx wasy cm-super babel-english gnu-freefont mathastext cbfonts-fd xetex
7272

7373
- name: Start virtual display (Linux)
7474
if: runner.os == 'Linux'

.mypy.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ ignore_errors = True
2323
[mypy-manim.utils.*]
2424
ignore_errors = True
2525

26+
[mypy-manim.utils.color]
27+
ignore_errors = False
28+
2629
[mypy-manim.animation.*]
2730
ignore_errors = True
2831

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repos:
2424
name: isort (pyi)
2525
types: [pyi]
2626
- repo: https://github.com/asottile/pyupgrade
27-
rev: v3.9.0
27+
rev: v3.10.1
2828
hooks:
2929
- id: pyupgrade
3030
name: Update code to new python versions
@@ -35,7 +35,7 @@ repos:
3535
- id: python-check-blanket-noqa
3636
name: Precision flake ignores
3737
- repo: https://github.com/psf/black
38-
rev: 23.3.0
38+
rev: 23.7.0
3939
hooks:
4040
- id: black
4141
- repo: https://github.com/asottile/blacken-docs
@@ -44,7 +44,7 @@ repos:
4444
- id: blacken-docs
4545
additional_dependencies: [black==22.3.0]
4646
- repo: https://github.com/PyCQA/flake8
47-
rev: 6.0.0
47+
rev: 6.1.0
4848
hooks:
4949
- id: flake8
5050
additional_dependencies:

docs/source/_templates/autosummary/class.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Qualified name: ``{{ fullname | escape }}``
77
.. autoclass:: {{ objname }}
88
:show-inheritance:
99
:members:
10+
:private-members:
11+
1012

1113
{% block methods %}
1214
{%- if methods %}

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"sphinx.ext.viewcode",
4444
"sphinxext.opengraph",
4545
"manim.utils.docbuild.manim_directive",
46+
"manim.utils.docbuild.autocolor_directive",
4647
"sphinx.ext.graphviz",
4748
"sphinx.ext.inheritance_diagram",
4849
"sphinxcontrib.programoutput",

manim/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
from .mobject.frame import *
4747
from .mobject.geometry.arc import *
4848
from .mobject.geometry.boolean_ops import *
49+
from .mobject.geometry.labeled import *
4950
from .mobject.geometry.line import *
5051
from .mobject.geometry.polygram import *
5152
from .mobject.geometry.shape_matchers import *

manim/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from . import __version__, cli_ctx_settings, console
99
from .cli.cfg.group import cfg
10+
from .cli.checkhealth.commands import checkhealth
1011
from .cli.default_group import DefaultGroup
1112
from .cli.init.commands import init
1213
from .cli.new.group import new
@@ -48,6 +49,7 @@ def main(ctx):
4849
pass
4950

5051

52+
main.add_command(checkhealth)
5153
main.add_command(cfg)
5254
main.add_command(plugins)
5355
main.add_command(init)

manim/_config/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
from pathlib import Path
2424
from typing import Any, Iterable, Iterator
2525

26-
import colour
2726
import numpy as np
2827

2928
from .. import constants
3029
from ..constants import RendererType
30+
from ..utils.color import ManimColor
3131
from ..utils.tex import TexTemplate, TexTemplateFromFile
3232
from ..utils.tex_templates import TexTemplateLibrary
3333

@@ -1096,7 +1096,7 @@ def format(self, val: str) -> None:
10961096

10971097
background_color = property(
10981098
lambda self: self._d["background_color"],
1099-
lambda self, val: self._d.__setitem__("background_color", colour.Color(val)),
1099+
lambda self, val: self._d.__setitem__("background_color", ManimColor(val)),
11001100
doc="Background color of the scene (-c).",
11011101
)
11021102

manim/animation/changing.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@
66

77
from typing import Callable
88

9-
from colour import Color
10-
119
from manim._config import config
1210
from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL
1311
from manim.mobject.types.vectorized_mobject import VGroup, VMobject
14-
from manim.utils.color import BLUE_B, BLUE_D, BLUE_E, GREY_BROWN, WHITE
12+
from manim.utils.color import (
13+
BLUE_B,
14+
BLUE_D,
15+
BLUE_E,
16+
GREY_BROWN,
17+
WHITE,
18+
ParsableManimColor,
19+
)
1520
from manim.utils.rate_functions import smooth
1621

1722

@@ -140,7 +145,7 @@ def __init__(
140145
self,
141146
traced_point_func: Callable,
142147
stroke_width: float = 2,
143-
stroke_color: Color = WHITE,
148+
stroke_color: ParsableManimColor | None = WHITE,
144149
dissipating_time: float | None = None,
145150
**kwargs,
146151
):

manim/animation/creation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ def construct(self):
7777
from typing import TYPE_CHECKING, Callable, Iterable, Sequence
7878

7979
import numpy as np
80-
from colour import Color
8180

8281
if TYPE_CHECKING:
8382
from manim.mobject.text.text_mobject import Text
8483

8584
from manim.mobject.opengl.opengl_surface import OpenGLSurface
8685
from manim.mobject.opengl.opengl_vectorized_mobject import OpenGLVMobject
86+
from manim.utils.color import ManimColor
8787

8888
from .. import config
8989
from ..animation.animation import Animation
@@ -259,7 +259,7 @@ def get_outline(self) -> Mobject:
259259
sm.set_stroke(color=self.get_stroke_color(sm), width=self.stroke_width)
260260
return outline
261261

262-
def get_stroke_color(self, vmobject: VMobject | OpenGLVMobject) -> Color:
262+
def get_stroke_color(self, vmobject: VMobject | OpenGLVMobject) -> ManimColor:
263263
if self.stroke_color:
264264
return self.stroke_color
265265
elif vmobject.get_stroke_width() > 0:

0 commit comments

Comments
 (0)