* feat: add TypstMobject and TypstMathMobject for first-class Typst support
Implement the initial TypstMobject proposal (see agents/typst.md):
- TypstMobject: renders arbitrary Typst markup to SVG via the 'typst'
Python package (self-contained Rust binary, no system install needed),
then imports through SVGMobject.
- TypstMathMobject: convenience subclass that wraps input in Typst math
delimiters ($ ... $).
Pipeline: user string → wrap in minimal Typst document (auto-sized page,
transparent background) → write .typ file → compile to SVG via
typst.compile() → import via SVGMobject → scale/center/recolor.
Key details:
- Compilation helper in manim/utils/typst_file_writing.py with SHA-256
content-hash caching (same scheme as the LaTeX pipeline).
- font_size property mirrors SingleStringMathTex: compile at fixed 11pt,
scale after import using initial_height / SCALE_FACTOR_PER_FONT_POINT.
- init_colors() recolors black submobjects to self.color (Typst default
fill is black), preserving any explicit Typst colors.
- path_string_config enables curve subdivision for smooth animation.
- 'typst' added as optional dependency group in pyproject.toml.
- 10 tests covering creation, font_size, caching, preamble, and repr.
* feat(typst): add sub-expression selection via {{ }} groups and .select()
- Override modify_xml_tree in Typst to convert data-typst-label
attributes to id attributes before svgelements parsing (avoids
attribute inheritance issue with data-* attributes)
- Add Typst.select(key) method accepting str labels or int indices
to retrieve VGroup sub-expressions from id_to_vgroup_dict
- Implement {{ }} double-brace preprocessor on TypstMath:
- {{ content }} → manimgrp("_grp-N", content) (auto-numbered)
- {{ content : label }} → manimgrp("label", content) (named)
- Skips {{ }} inside string literals and [...] content blocks
- Uses math-mode call convention (no # prefix) to keep args in
math mode
- Auto-inject manimgrp preamble when groups are detected
- Add 12 new tests covering label mapping, nesting, select(),
error handling, and preprocessor edge cases
* Remove unneeded assert line
* Generalize some more critical hard-coded LaTeX assumptions
* Fix syntax error
* Support Typst labels in existing APIs
* Add ManimTextLabel typing alias
* Preserve Typst SVG stroke widths by default
* Calibrate Typst font sizing against TeX
* Add Typst mobject documentation
* Track Typst baseline frames
* Document Typst baseline frame tracking
* Add Typst section to text guide
* Polish Typst docs and label handling
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Improve Typst stroke scaling and docs examples
* Tune Typst SVG stroke scaling
* Restore Typst math example wording
* Fix pre-commit issues for Typst branch
* Fix number line runtime typing import
* Exclude Typst autogenerated .rst files
* Use Manim directive in docstrings and fix wrong key in Typst.select() docstring
* Fix GroupedMath comments
---------
Co-authored-by: Toon Verstraelen <Toon.Verstraelen@UGent.be>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <francisco.manriquezn@usm.cl>
GenericGraph.__getitem__ only handled vertex lookup. Passing a 2-tuple
(u, v) to retrieve an edge mobject raised a KeyError against the
vertices dict instead of looking up self.edges.
Route tuple keys of length 2 to self.edges so that g[(u, v)] returns
the edge mobject, consistent with how edges are stored internally.
Adds a test covering vertex lookup, edge lookup (Graph), and edge
lookup (DiGraph).
Fixes#3798
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Issue-4087 Add bug test
* Issue-4087 Fix bug
* Issue-4087 Fix comment and add type hint
* Issue-4087 Fix comment
* Issue-4087 Improve previous test instead of adding a new one
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update tests/module/mobject/mobject/test_mobject.py
* Enhance docstring for reduce_across_dimension method
Updated docstring for reduce_across_dimension method to clarify its purpose and parameters.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove float typehints for coords in length_over_dim
* Modify test for empty VMobject dimensions
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add option to hide/show inner lines in Table class
* Add tests for Table class inner lines visibility
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Correct indentation
* Fix os.startfile usage to check for availability on Windows
* Add ConversationFlowScene to animate user-chatbot interactions and metadata display
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Revert "Merge remote-tracking branch 'origin/conversation' into hide_table_inner_lines"
This reverts commit c0ba5b8511, reversing
changes made to 1f71f4b0e8.
* Revert change
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Leonardo Cariaggi <leonardo.cariaggi@kbc.be>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Add regression tests for four recent fixes in vectorized_mobject.py
Adds four regression tests for fixes that landed without tests in the same PR:
* 21cf9998 (PR #4630, fixes#3569 + #4629) -- IndexError in
`get_nth_subpath` when `path_list` is empty; ensure it always returns
a NumPy array.
* f6cdb547 (PR #4219) -- `add_points_as_corners` silently dropped a
single new point when called on a VMobject whose last subpath was
complete.
* 3d029c12 (PR #4320, fixes#4255) -- `pointwise_become_partial` cleared
the target's points when the source had no cubic curves, surfacing as
`Arrow3D.get_start()` / `get_end()` returning the origin after a
`Create` animation.
* 429f25328 (PR #4694) -- `scale(scale_stroke=True)` on a compound
VMobject propagated the parent's scaled stroke width to every
submobject, overwriting submobjects with their own (e.g. zero) stroke.
Each test reproduces the original failing condition at the unit level
and asserts the post-fix behavior. Validation: every test was confirmed
to fail when the corresponding fix is reverted on the source file, and
pass when the fix is restored.
4 tests, ~0.2s runtime. Tests go in the existing files
`tests/module/mobject/types/vectorized_mobject/test_vectorized_mobject.py`
(three tests, adjacent to their topically-related siblings) and
`tests/module/mobject/types/vectorized_mobject/test_stroke.py` (one test,
next to the existing `test_stroke_scale`).
Co-authored-by: LetMarq <LetMarq@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: THE-RAF <THE-RAF@users.noreply.github.com>
Co-authored-by: LetMarq <LetMarq@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Add unit tests for module-level color helpers in manim/utils/color/core.py
Adds tests/module/utils/test_color_helpers.py covering the standalone
helper functions exported from manim.utils.color.core (color_to_rgb,
color_to_rgba, color_to_int_rgb, color_to_int_rgba, rgb_to_color,
rgba_to_color, rgb_to_hex, hex_to_rgb, invert_color, color_gradient,
interpolate_color, average_color, random_bright_color, random_color)
and the RandomColorGenerator class.
Before this PR, only the ManimColor class itself was tested
(via tests/module/utils/test_manim_color.py); the standalone helpers
had zero direct test coverage. Coverage on manim/utils/color/core.py
goes from 71% to 80% (line+branch), and 17 of the 18 testable symbols
in the file's __all__ are now exercised. The only deferred symbol is
get_shaded_rgb, which concerns lighting math rather than color
conversion and is better suited to a follow-up.
42 tests, ~0.3s runtime, no new dependencies.
Co-authored-by: LetMarq <LetMarq@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update tests/module/utils/test_color_helpers.py
Increased assertion scheme to cover all colors.
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
---------
Co-authored-by: THE-RAF <THE-RAF@users.noreply.github.com>
Co-authored-by: LetMarq <LetMarq@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* fix: preserve geometry in put_start_and_end_on for zero-vector mobjects
* fix: preserve geometry in put_start_and_end_on for zero-vector mobjects
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed asser_array_equal line
* removed commets in mobject.py and opengl_mobject.py as suggested
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added stacklevel=2 suggestion
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Fix unintended kwargs propagation in LaggedStartMap
Ensure intended for are not forwarded to the superclass, and make explicit.
* add test for keyword propagation in LaggedStartMap
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update test_composition.py
update the test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update test_composition.py
add there_and_back
---------
Co-authored-by: Benjamin Hackl <mail@behackl.dev>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fixing #4591
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix: replace double-brace splitting regex with state-machine parser
The previous re.split(r'{{|}}', ...) call split on any occurrence of
{{ or }} in the input string, which broke strings whose only }} came
from closing two nested LaTeX brace groups (e.g. ^{\frac{Mq}{M+m}}).
The new _split_double_braces() static method uses a character-level
state machine with three guards:
* Escape priority: \\ is consumed before \{ / \}, so \\}} is
correctly read as an escaped backslash followed by a real }}, not
misinterpreted as \ + \} + lone }.
* Whitespace-gated opener: {{ is only treated as a Manim group opener
at the start of the string or after whitespace. Naturally-occurring
{{ in LaTeX is usually preceded by non-whitespace (e.g. \frac{{{n}}}
or a^{{2}}), so this eliminates the most common false positives.
* Depth-tracking closer: inside a Manim group, }} only closes the
group when the inner brace depth is zero, so {{ a^{b^{c}} }} is
handled correctly and nested LaTeX }} cannot trigger an early close.
Fixes#4601.
* docs: document double-brace whitespace requirement
Add a Notes section to the MathTex docstring explaining:
- how {{ }} splits a string into submobjects
- that {{ must be at start-of-string or preceded by whitespace
- that this leaves natural LaTeX like \frac{{{n}}}{k} untouched
- the { { ... } } escape hatch when a split is not wanted
Apply the same explanation to the double-brace paragraph in
docs/source/guides/using_text.rst.
* fix: use r-string for _split_double_braces docstring, halve backslash escaping
* Extracted the method get_mob_from_shape_element
* Moved more functionality to get_mob_from_shape_element
* More cleanup
* Parse the svg file while maintaining the group structure.
* Make the svg groups available
* Handle PERF401 issue
* [pre-commit.ci] pre-commit autoupdate (#4506)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.14.7 → v0.14.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.7...v0.14.8)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added an example of the issue
* Experimenting with coloring elements from the latex equation
* ...
* Regular expression can now match more than one object
* Process the string by applying the substrings in the order they match
* Code refactoring and added type annotations
* ...
* Added a lot of test cases
* More examples
* More examples
* Use matched_strings_and_ids to simplify existing methods
* Remove unused code
* Update get_part_by_tex to use matched_strings_and_ids
* This is required for test_MathTable to pass
* Ensure that self.texstring is set.
* Added more examples from exising issues in the github repo
* Ensure that latex groups are maintained by adding an additional pair of curly braces around the extracted part
* ExampleScene -> Scene
* Added comment
* _break_up_by_substrings
* Refactor code
* Added comment to example
* Handle integer inputs well.
* Expose the original tex_string
* Do not treat the content of substrings_to_isolate as regular expressions.
* Updated examples
* Update examples
* Fix SVMobject caching issue.
* Remove traces from brace_notation_split_occurred
* Simplify MathTex::_break_up_by_substrings
* Fix small issue in tex that in some cases moved elements a tiny bit around
* No use of regular expressions for locate substrings.
* Updated notes to the set of test cases
* Handle issues with the center environment.
* Add example
* Fix issue with rectangles (e.g. from sqrt)
* ConvertToOpenGL
* Reduce the number of nesting levels.
* Use the specified arg_seperator
* Deal with the double curly brace markup
* Code cleanup
* Code cleanup
* Rollback a few changes
* Code cleanup
* Adjust paths the generated artefacts in tests that rely on MathTex
* Added a remark to the using text guide on enclosing snippets in curly braces for substrings_to_isolate to work
* Added space around the numerator argument to frac to avoid having double curly braces in the example.
This would otherwise trigger MathTex to split the string at that location.
* Log errors properly and display some information about the errors and their context.
* Code refactoring as suggested by Benjamin
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* sub_alphas is derived directly from to_update so they're guaranteed to be of the same length.
* self.shapes is initialised as a direct copy of the mobject, guaranteed to be of same length.
* linspace in this case guarantees both arrays are of equal size (self.n_segments).
* Any transformation already requires that each datapoint in the first tuple has a corresponding datapoint in the second (ie same length)
* Replaced arange with linspace, eliminates risk of floating point errors and forces rgbas and offset to be the same size for strict=True
* all_arc_configs is either defined specifically by length of point_pairs or strictly forced to be the same length (n). In any case they'll always be the same length so strict=True works.
* There should always be an equal amount of start and end anchors; radius_list is defined directly from the length of vertex_group; both outer_vertices and inner_vertices posess n vertices.
* boundary_times always contains has an even length so both 'slices' in the zup function are the same length.
* colors_in_gradient is defined to be the same length as p_list_complete; labels and parts are seemingly user inputs with no guarantee of equal length; val_range is defined to be same lenght as self.bar_names; however there's no authentication that self.values has a fixed length after it's been defined ie user can append to the list creating a mismatch between len(self.values) and len(self.bars)
* In most cases here, the tuples are either defined to be of same length or manipulated to be by the align_data function. In the match_points function there is currently no validation to ensure both mobjects are the same length.
* Reverting _add_x_axis_labels() zip() function back
to strict=False due to failing test cases
* Reverted strict zip usage
* color_gradient is defined to be same length as p_list_complete & within _add_x_axis_labels we define val_range to be the same length as self.bar_names
* align_data and lock_matching_data have no validation to ensure tuples in the zip() function are of the same length. Every other time zip() is used here it is generally immediately manipulating or explicitly defining the tuples to be of same length
* All tuples in zip() functions here are either clearly the same size or manipulated to be the same size using the make_even function.
* The tuples in the zip() function will clearly be of equal length, the second tuple is simply a cyclic shift of the first.
* In the ingest_submobjects function arrays is a one to one mapping of attrs so they are guaranteed to have equal lengths.
* Every usage of zip() consists of tuples that are either manipulated to be equal size or defined to be equal size.
* the zip() function in bezier_remap will always consist of equal length tuples as current_number_of_curves is read directly from the shape of bezier_tuples and is used to dictate the size of split_factors.
* The zip() function color_gradient() will always consist of equal length tuples as floors is defined directly from alphas (which also defines alphas_mod1)
* The tuples in the zip() function in adjacent_n_tuples will always be the same length so strict=True.
* The find_intersection() contains a zip() function that has been set to strict=True. While it is technically possible to pass tuples to this function that are *not* the same length, this would result in generally unexpected behaviour anyway.
* Changed zip() function to have strict=True in __init__() as custom_labels is dependent on tick_range so guaranteed to have the same length.
* Several instances of zip() set to strict=True. In add_coordinates we have axis manipulated to be the same length as tick_range. In get_riemann_rectangles() we have colors dependent on of x_range_Array forcing them to be the same length. Finally in plot_line_graph() it is clearly intended that all inputs used in the zip() function are of the same length (except possibly z which may not exist and will be made equal length to x); while it is not guaranteed they will be the same length this would cause unintended behaviour.
* zip() function bool changed to strict=True in all these test cases. Most test cases either a) hardcode two things to be the same length, b) verify things are the same length before the function or c) explicitly exist to check whether two things are the same length.
* fix: infinite recursion caused by accessing color of a highlighted Table cell.
fix: removed type: ignore[attr-defined] mypy was not a fan of
* fix: added back needed mypy type ignore
* Add regression tests for Table/BackgroundRectangle color access
Tests for infinite recursion issue fixed in PR #4435 (issue #4419).
Refs: #4419
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Refactor BackgroundRectangle color test to geometry tests
Move test_background_rectangle_color from test_table.py to
test_unit_geometry.py since BackgroundRectangle lives in
geometry/shape_matchers.py, not in tables.
Regression test for ManimCommunity/manim#4419 (infinite recursion
when accessing BackgroundRectangle.color)
* Fix: Added missing manim GREEN import needed for test_BackgroundRectangle_color_access()
---------
Co-authored-by: Henrik Skov Midtiby <hemi@mmmi.sdu.dk>
Co-authored-by: Benjamin Hackl <mail@behackl.dev>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: bhearr <None>
* feat: 'seed' option for reproducible outputs
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* enh: let Scene automatically pick global random seed, use arg as override
* chore: move import slightly
* chore: add test for color generator being reproducible with global config seed
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* fix: correct Circle.point_at_angle calculation for accurate arc mapping
* chore: remove unused variable 'start_angle' to fix pre-commit CI
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* test: add test for Circle.point_at_angle()
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henrik Skov Midtiby <hemi@mmmi.sdu.dk>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Benjamin Hackl <mail@behackl.dev>
* Add ruff rules PERF for performance
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix duplicated arrow tips in DashedVMobject and add tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Add regression tests for about_point view mutation issue
This adds regression tests for issue #4445 where using get_vertices()[0]
as about_point in transformation methods would cause incorrect results
due to numpy array view mutation.
Tests added:
- test_rotate_about_vertex_view
- test_scale_about_vertex_view
- test_stretch_about_vertex_view
- test_apply_matrix_about_vertex_view
- test_opengl_rotate_about_vertex_view (OpenGL was not affected by the bug)
Related to #4445
* Fix about_point view mutation in apply_points_function_about_point
When about_point parameter receives a numpy array view (e.g., from
get_vertices()[0]), the in-place operation `mob.points -= about_point`
would mutate the view, corrupting the transformation calculation.
This fix copies about_point before using it to prevent view mutation.
The OpenGL renderer was not affected by this bug because it uses
`arr - about_point` (creates temporary) instead of `arr -= about_point`
(mutates in-place).
Fixes#4445
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add implementation for tangential arc
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add example
* Improve doc slightly
* Remove corner type
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add test for TangentialArc
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Import Line only if type checking
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add missing type hint
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add test for tangential arc
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Give SurroundingRectangle 2D buffer
* add test for SurroundingRectangle buff parameter
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Fix(graph) : fix Line subclass usage for Graph and DiGraph
Fix(graph): LabeledLine can now be used in _add_edge
* Test(test_graph.py): add tests for LabeledLine as edge_type in Graph and DiGraph
Fix(test_graph): Fixed test_graph_accepts_labeledline_as_edge_type() always failing.
* Fix Line failing with buff and path_arc
- make copy of vmobject.points if necessary
* change self to self.copy() in Line, and remove the previous change in pointwise_become_partial()
* Revert to first approach: copy points if self is vmobject
* Add unit test for pointwise_become_partial and Line
---------
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Bugfix: colorsys uses HLS (hue, luminance, saturation) ordering when converting to/from rgb. Manim says it uses HSL ordering. Fixed order of parameters in call to colorsys for ManimColor.from_hsl and ManimColor.to_hsl.
Added tests ensure correct HSL ordering.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update to fix the correct color tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: SonnyRoomex <sonny.campbell@roomex.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* add __hash__ to ManimColor
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update core.py
* add test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: correct typehint
* fix test
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Fix VMobject.add_points_as_corners() to return self and safely handle case where no points are passed
* Add test_vmobject_add_points_as_corners()
* assert np.allclose() -> np.testing.assert_allclose()
* Allow animations with run_time=0 and implement convenience Add animation
* Modify examples so that there are less characters per line
* Docstring fixes
* Update manim/animation/animation.py
* Address comments
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Implement SurroundingRectangle.multiple and BackgroundRectangle.multiple
* Integrate SurroundingRectangle constructor for multiple objects into __init__
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* SurroundingRectangle now takes multiple Mobjects as positional args
* Add tests for multiple Mobjects in SurroundingRectangle
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix example that was not using keyword args for SurroundingRectangle
* Remove duplicate code from BackgroundRectangle
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add typing to manim argument of SurroundingRecrabgle constructor
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Remove redundant argument from test_SurroundingRectangle
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Remove type check from SurroundingRectangle
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix missing line issue
* resolve merge conflict
* Fix Group import
* Move Group import into the body of SurroundingRectangle
* Return type checking to SurroundingRectangle
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* small change to error message
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix missing imports
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
Co-authored-by: JasonGrace2282 <aarush.deshpande@gmail.com>
* Add option to scale object outlines with objects
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Move outline scaling into VMobject.scale()
* Add unit tests for stroke width
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix docstring for VMobject.scale
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Remove tautology from VMobject.scale
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Refactored Animation run_time validation
* Rewrite error and warning messages, and add validations to wait(), pause() and wait_until()
* Undo rewriting of imports