Commit graph

7 commits

Author SHA1 Message Date
Darylgolden
6018ebf445 Revert "Merge branch 'main' of https://github.com/ManimCommunity/manim"
This reverts commit e7f9d23aa7, reversing
changes made to afe91d02b6.
2023-07-31 15:29:39 +08:00
Kevin Lubick
b54743e81d
Add scene.replace() and use in ReplacementTransform (#3042)
* Add scene.replace() and use in ReplacementTransform

This replace method allows one mobject to take the place (that is,
the draw order) of another mobject.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Address Feedback

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update visual Replacement test and fix extract_frames.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* allow flake8 to be unhappy

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>
2023-01-27 12:23:33 +01:00
Kevin Lubick
c4f1d202a9
Prevent TransformMatchingTex from crashing when there is nothing to fade (#2846)
* Prevent TransformMatchingTex from crashing when there is nothing to fade

Fixes #2845 and adds tests.

I originally tried to make FadeTransformPieces not crash if it was given two Mobjects with no submobjects, but I couldn't quite get that to work. This is probably the less invasive of a change.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* use Tex arrows

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>

* Update expectations after Tex change

* Address feedback

This makes FadeTransform::ghost_to more robust to receiving an empty target. It is currently unspecified what should happen, so how about just fading in place?

* [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>
2022-09-24 16:22:42 +02:00
Simeon Widdis
bcb5233259
Add documentation and testing for Transform's path_func behavior (#2771)
* Add graphical tests for Transform with paths

* Rewrite path function setting in Transform

Currently setting the path function in Transform is done unintuitively,
this commit reorders the path_func assignment to make it more clear what
it's doing.

Passes 609 tests / Skips 12 tests

* Add Parameter DocString to Transform class

* Add Transform test for conflicting path settings

* Apply suggestions from code review

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>

* Update manim/animation/transform.py

Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
2022-06-19 01:56:15 +02:00
ad_chaos
db504a548b
Fixed bug with invalid color type `None` (#2584)
* Add test

* Seperate test

* Better solution

* Rebasing is hard

* revert changes to get_style

* handle color lists containing None properly

* added test for match_style with gradient

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-03-06 19:30:02 +01:00
Jihoon
b6f7acf0e1
Added `about_point keyword argument to :class:~.ApplyMatrix` (#2388)
* Added `about_point` for :class:`~ApplyMatrix`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add unit test

* Fix test

* remove unit_test because transform does not update points

* minor docstring formatting changes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Laith Bahodi <laithbahodi@gmail.com>
Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2021-12-31 00:14:52 +00:00
Benjamin Hackl
044dcad53f
Made frames_comparsion testing utility a proper module of the library (#2346)
* make frame_comparison a part of the library

* update frames_comparison imports; move control data

* change import in documentation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* properly split up boolean_ops tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* added __init__ to utils.testing

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-03 21:18:18 +01:00