manim/tests/test_graphical_units/control_data/creation
darkways 5071e9418b
Fix Bug Uncreate() with rate_func via introducing new parameter reversed to class Animation (#2597)
* `Uncreate()` works with `rate_func` ,fix #2469

Place the reverse of `rate_func` to become part of the process in `Uncreate()`.

The original `uncreate()` is implemented by setting a specific value to `rate_func`.

Now, if you want to set parameter`rate_func` when using `Uncreate()`, you can set the parameter `reverse_rate_func` to `Uncreate()`.

Examples

```python
.. manim:: ShowUncreate

        class ShowUncreate(Scene):
            def construct(self):
                self.play(Uncreate(Square(), reverse_rate_func=linear))
```

But problems remains when you try to pass parameter `rate_func` to `Scene.play()`

* fix issue #2469

* Add parameter reversed to class Animation

Fix an error in the last [commit](47b5196e3f). The "remover" decided whether it would reverse. Now it correctly passes the power of decision to "reversed".
Add a bool parameter `reversed` to class `Animation`. It decides whether the animation need to be played backwards. Default to be False.

* Add unit tests for usages of `Uncreate()`

* Add control data for the new unit test

* change the implementation of `Unwrite` to the same logic as `Uncreate`

* Rename parameter `reversed`, add descriptions, style #2597

Rename `reversed` to the more explicit `reverse_rate_function`, in class Animation.
Explicitly mention in documentation that setting `reverse_rate_function` doesn't have any effect on `remover` and `introducer`.

* improve documentation of parameter `reverse_rate_function`, doc #2597

improve documentation of parameter `reverse_rate_function` in class `Animation`

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

* doc: remove unnecessary comments in creation.py

The comment was added because the name of the parameter `reversed` was similar to reverse, which is a also parameter, but defined in Write().
Now the parameter has a more explicit name `reverse_rate_function`. Developers can get the main idea from its name. So we don't need the comment to tell.

Co-authored-by: Sefik-Palazoglu <sefik.palazoglu.s@gmail.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2022-04-09 09:49:16 +00:00
..
bring_to_back_introducer.npz Fixed render flow issues with introducer animations (#2594) 2022-03-08 20:25:04 +00:00
create.npz Made frames_comparsion testing utility a proper module of the library (#2346) 2021-12-03 21:18:18 +01:00
DrawBorderThenFill.npz Made frames_comparsion testing utility a proper module of the library (#2346) 2021-12-03 21:18:18 +01:00
FadeIn.npz Made frames_comparsion testing utility a proper module of the library (#2346) 2021-12-03 21:18:18 +01:00
FadeOut.npz Made frames_comparsion testing utility a proper module of the library (#2346) 2021-12-03 21:18:18 +01:00
GrowFromCenter.npz Made frames_comparsion testing utility a proper module of the library (#2346) 2021-12-03 21:18:18 +01:00
GrowFromEdge.npz Made frames_comparsion testing utility a proper module of the library (#2346) 2021-12-03 21:18:18 +01:00
GrowFromPoint.npz Made frames_comparsion testing utility a proper module of the library (#2346) 2021-12-03 21:18:18 +01:00
ShrinkToCenter.npz Made frames_comparsion testing utility a proper module of the library (#2346) 2021-12-03 21:18:18 +01:00
SpinInFromNothing.npz Made frames_comparsion testing utility a proper module of the library (#2346) 2021-12-03 21:18:18 +01:00
uncreate.npz Made frames_comparsion testing utility a proper module of the library (#2346) 2021-12-03 21:18:18 +01:00
uncreate_rate_func.npz Fix Bug Uncreate() with rate_func via introducing new parameter reversed to class Animation (#2597) 2022-04-09 09:49:16 +00:00
z_index_introducer.npz Fixed render flow issues with introducer animations (#2594) 2022-03-08 20:25:04 +00:00