ManimCommunity / ManimCommunity/manim
using `Write` `reverse=True` makes the object disappear after writing
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
## Description of bug / unexpected behavior
If you use `Write` with kwarg `reverse=True` the animation of object, say the text, will start from right to left, which is the intended action, and it does work, however once the animation ends, the object just disappear.
## Expected behavior
The object should not disappear.
## How to reproduce the issue
Code for reproducing the problem
```py
class write_text_dir_rtl(Scene):
def construct(self):
text = Tex("Hello World")
self.play(Write(text, reverse=True))
self.wait()
```
## Workaround
A workaround for this issue is to use `self.add(text)` after animating in to keep it in the frame.
The code should look like this.
```py
class write_text_dir_rtl(Scene):
def construct(self):
text = Tex("Hello World")
self.play(Write(text, reverse=True))
self.add(text)
self.wait()
```
Contributor guide
Research direction
Run the provided Python reproduction with Scene, Tex, and Write(reverse=True) first. Trace how Write handles the object when the reverse animation finishes, then verify that the object remains visible without the self.add(text) workaround. Done means the original example keeps the text on screen after the animation completes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100