Submobjects of VMobject.
- Lingua principale
- Python
- Stelle
- 93.8k
- Fork
- 7.7k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
I believe, it would be a good idea if VMobject were more tolerant to having general Mobjects (non-VMobjects) as submobjects.
Rationale:
1. Mobjects, together with all its submobjects can be, for example, moved around.
2. It would be nice to being able to Mobject.add() some sort of anchors to a VMobject.
3. This way, if the vmobject is moved or rescaled, the anchors are automatically updated.
4. For example, to get a circle center, I am using VMobject.get_center(). However, during ShowCreation, VMobject.get_center() changes its position.
5. Worse than that, when you move a circle, for example, Circle:arc_center is not updated. Where it a submobject, it would be (hopefully) always updated.
6. Almost the same can be said about Line:start and Line:end.
Is it a good idea to make VMobject more tolerant to non-VMobject submobjects? I can implement it... if people think it is good.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Look at the VMobject class in manim/mobject/types/vectorized_mobject.py to understand how submobjects are handled. The change likely involves modifying the add() method and the update mechanisms for transformations. Check how Circle and Line manage their start, end, and arc_center attributes. A test should verify that non-VMobject anchors move correctly when the parent VMobject is transformed.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- computer-graphics
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100