ManimCommunity / ManimCommunity/manim
Document and/or fix the exact object behavior of Transform-like animations
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
Currently, it is not documented what Transform-like animations do to the transformed objects (both the target and the object that was being transformed). It appears that both stay on screen, making further transformations and movement of either the transformed object or the target have weird behavior. A simple example would be:
```py
class Example(Scene):
def construct(self):
# mobjects don't matter as long as they can be transformed
text1 = Text('A')
text2 = Text('B')
text3 = Text('C')
self.play(Transform(text1, text2))
# - Which of the two first texts should be the "source" here?
# - In either case, this animation leaves a double 'B' behind.
# - This also happens with at least TransformMatchingTex.
self.play(Transform(text2, text3))
```
My current workaround is to remove all objects that were involved, then add back the target object.
I'm not filing this as a bug as I'm not sure whether anyone relies on the behavior, and better documenting this behavior is already a good step. However, in terms of fixing it I'm also not sure which of the two objects should be removed by the animation.
Contributor guide
Research direction
Start with the Transform and TransformMatchingTex entry points and trace how the source and target objects are retained after play(). Determine the intended source/target lifecycle, then document the exact behavior with the provided example; the issue is done when object ownership and the expected result of subsequent transformations are unambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100