Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from 3b1b:master #16

Merged
merged 8 commits into from
Jan 3, 2023
Next Next commit
Use Vect3 type in fading.py
  • Loading branch information
3b1b committed Dec 30, 2022
commit cec43dfe51fc4aff41a6cf848b4b270946310a28
7 changes: 4 additions & 3 deletions manimlib/animation/fading.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from manimlib.mobject.mobject import Mobject
from manimlib.mobject.types.vectorized_mobject import VMobject
from manimlib.scene.scene import Scene
from manimlib.typing import Vect3



Expand Down Expand Up @@ -48,7 +49,7 @@ class FadeOut(Fade):
def __init__(
self,
mobject: Mobject,
shift: np.ndarray = ORIGIN,
shift: Vect3 = ORIGIN,
remover: bool = True,
final_alpha_value: float = 0.0, # Put it back in original state when done,
**kwargs
Expand All @@ -69,7 +70,7 @@ def create_target(self) -> Mobject:


class FadeInFromPoint(FadeIn):
def __init__(self, mobject: Mobject, point: np.ndarray[int, np.dtype[np.float64]], **kwargs):
def __init__(self, mobject: Mobject, point: Vect3, **kwargs):
super().__init__(
mobject,
shift=mobject.get_center() - point,
Expand All @@ -79,7 +80,7 @@ def __init__(self, mobject: Mobject, point: np.ndarray[int, np.dtype[np.float64]


class FadeOutToPoint(FadeOut):
def __init__(self, mobject: Mobject, point: np.ndarray[int, np.dtype[np.float64]], **kwargs):
def __init__(self, mobject: Mobject, point: Vect3, **kwargs):
super().__init__(
mobject,
shift=point - mobject.get_center(),
Expand Down