ManimCommunity / manim

A community-maintained Python framework for creating mathematical animations.
https://www.manim.community
MIT License
21.42k stars 1.57k forks source link

Fix `DiGraph` edges not fading correctly on `FadeIn` and `FadeOut` #3786

Closed Nikhil-42 closed 3 months ago

Nikhil-42 commented 4 months ago

Overview: What does this pull request change?

This pull request resolves issue #3749 in which edges do not FadeOut properly when using DiGraph. The default updater in the DiGraph class used the edge constructor .become to attach the edges to the vertices. I replaced the updater to function more similarly to the Graph updater which moves the endpoints of the Line. Also, noticed that Line::set_points_by_ends did not project onto the bounding box of start and end so I updated the behavior to match the constructor and the type hints to align with usage in the example scenes.

Links to added or changed documentation pages

https://manimce--3786.org.readthedocs.build/en/3786/reference/manim.mobject.geometry.line.Line.html#manim.mobject.geometry.line.Line.set_points_by_ends

Further Information and Comments

Fixes #3749

Reviewer Checklist

Nikhil-42 commented 3 months ago

@chopan050 Thanks for the edit!

Side note: I'm interested in helping with the rewrite, do you know how I could get into that?

chopan050 commented 3 months ago

Side note: I'm interested in helping with the rewrite, do you know how I could get into that?

Any help is greatly appreciated! Simply join #dev-chat on the Manim Discord server, or the [manim/experimental] post on #development, and say that you're interested in helping. Somewhere in that post there's a list of the current tasks we have to do in experimental.

JasonGrace2282 commented 3 months ago

Feel free to ping me on Discord (I'm still @JasonGrace2282 ) if you want me to walk you through where we are right now in the rewrite :) I'm always glad to have more people interested :) You can also take a look at #3817