ManimCommunity / ManimCommunity/manim
Some ideas for restructuring Mobject attributes.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
As we are restructuring how manim is configured right now, I have some suggestions:
```py
class Example(Scene):
def construct(self):
dot = Dot().set_color(GREEN)
dot.set_color(RED)
dot.color=BLUE
print(dot.color)
self.add(dot)
self.wait(1)
```
This script adds a red dot to the scene, however, it prints the # for blue color.
Here it would be nice if dot.color=BLUE would actually change the color to blue on the displayed dot.
Secondly:
```py
class Example(Scene):
def construct(self):
dot = Dot(radius=0.1)
print(dot.radius) # prints 0.1
dot.set_width(2)
print(dot.radius) # prints 0.1
dot.radius = 10
print(dot.radius) # prints 10
self.add(dot) # adds dot with radius 2
```
Here, we can set the width of a dot, which changes its radius, but the attribute parameter of Dot is not touched.
At the same time, when the radius attribute of Dot is touched, the displayed dot won't change its shape.
I think that this is not a big problem, but in case there is a nice solution to it, that would be great!
And thirdly:
```py
class Example(Scene):
def construct(self):
t1 = Text("1")
t2 = Text("2").next_to(t1)
t3 = Text("3").next_to(t2)
self.add(t1,t2,t3)
```
This is producing White text for all three text Mobjecs. When a white background is used, I think it would be nice to have an easy option to change the default parameter once of Text at the beginning of the script, without the necessity to change it for all three TextMobjects
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Dot and Text examples in the issue and trace how their attributes, setters, and displayed state currently interact. Clarify whether the goal is synchronized attribute assignment, consistent geometry updates, configurable Text defaults, or all three; done should be defined by agreed behavior for each example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100