mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 11:03:03 +08:00
Change type hint on LaggedStart to accept any functions outputting animations
This commit is contained in:
@ -165,7 +165,7 @@ class LaggedStart(AnimationGroup):
|
||||
class LaggedStartMap(LaggedStart):
|
||||
def __init__(
|
||||
self,
|
||||
AnimationClass: type,
|
||||
anim_func: Callable[[Mobject], Animation],
|
||||
group: Mobject,
|
||||
arg_creator: Callable[[Mobject], tuple] | None = None,
|
||||
run_time: float = 2.0,
|
||||
@ -175,7 +175,7 @@ class LaggedStartMap(LaggedStart):
|
||||
anim_kwargs = dict(kwargs)
|
||||
anim_kwargs.pop("lag_ratio", None)
|
||||
super().__init__(
|
||||
*(AnimationClass(submob, **anim_kwargs) for submob in group),
|
||||
*(anim_func(submob, **anim_kwargs) for submob in group),
|
||||
run_time=run_time,
|
||||
lag_ratio=lag_ratio,
|
||||
)
|
||||
|
Reference in New Issue
Block a user