mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 19:46:21 +08:00
OldLaggedStart -> LaggedStartMap
This commit is contained in:
@ -330,7 +330,7 @@ class NumberlineTransformationScene(ZoomedScene):
|
||||
|
||||
# Add tiny dots
|
||||
if local_sample_dots is not None:
|
||||
anims.append(OldLaggedStart(GrowFromCenter, local_sample_dots))
|
||||
anims.append(LaggedStartMap(GrowFromCenter, local_sample_dots))
|
||||
zcbr_group.add(local_sample_dots)
|
||||
|
||||
if first_added_anims:
|
||||
@ -424,7 +424,7 @@ class ExampleNumberlineTransformationScene(NumberlineTransformationScene):
|
||||
sample_dots = self.get_sample_dots()
|
||||
local_sample_dots = self.get_local_sample_dots(x)
|
||||
|
||||
self.play(OldLaggedStart(GrowFromCenter, sample_dots))
|
||||
self.play(LaggedStartMap(GrowFromCenter, sample_dots))
|
||||
self.zoom_in_on_input(
|
||||
x,
|
||||
local_sample_dots=local_sample_dots,
|
||||
@ -461,7 +461,7 @@ class WriteOpeningWords(Scene):
|
||||
word_wait = 2 * letter_wait
|
||||
comma_wait = 5 * letter_wait
|
||||
for word in words:
|
||||
self.play(OldLaggedStart(
|
||||
self.play(LaggedStartMap(
|
||||
FadeIn, word,
|
||||
run_time=len(word) * letter_wait,
|
||||
lag_ratio=1.5 / len(word)
|
||||
@ -833,7 +833,7 @@ class GraphicalIntuitions(GraphScene):
|
||||
)
|
||||
self.play(FadeIn(integral_text))
|
||||
self.play(
|
||||
OldLaggedStart(
|
||||
LaggedStartMap(
|
||||
GrowFromEdge, rects,
|
||||
lambda r: (r, DOWN)
|
||||
),
|
||||
@ -855,7 +855,7 @@ class GraphicalIntuitions(GraphScene):
|
||||
word.add_background_rectangle()
|
||||
words.arrange(DOWN)
|
||||
words.to_edge(UP)
|
||||
return OldLaggedStart(
|
||||
return LaggedStartMap(
|
||||
FadeIn, words,
|
||||
rate_func=there_and_back,
|
||||
run_time=len(words) - 1,
|
||||
@ -1009,8 +1009,8 @@ class MoreTopics(Scene):
|
||||
|
||||
self.add(calculus)
|
||||
self.play(
|
||||
OldLaggedStart(ShowCreation, lines),
|
||||
OldLaggedStart(Write, others),
|
||||
LaggedStartMap(ShowCreation, lines),
|
||||
LaggedStartMap(Write, others),
|
||||
)
|
||||
self.wait()
|
||||
|
||||
@ -1364,12 +1364,12 @@ class IntroduceTransformationView(NumberlineTransformationScene):
|
||||
sd.save_state()
|
||||
sd.scale(2)
|
||||
sd.fade(1)
|
||||
self.play(OldLaggedStart(
|
||||
self.play(LaggedStartMap(
|
||||
ApplyMethod, sample_dots,
|
||||
lambda sd: (sd.restore,),
|
||||
run_time=2
|
||||
))
|
||||
self.play(OldLaggedStart(
|
||||
self.play(LaggedStartMap(
|
||||
GrowArrow, arrows,
|
||||
run_time=6,
|
||||
lag_ratio=0.3,
|
||||
@ -1380,7 +1380,7 @@ class IntroduceTransformationView(NumberlineTransformationScene):
|
||||
run_time=3
|
||||
)
|
||||
self.wait()
|
||||
self.play(OldLaggedStart(FadeOut, arrows, run_time=1))
|
||||
self.play(LaggedStartMap(FadeOut, arrows, run_time=1))
|
||||
|
||||
self.sample_dots = sample_dots
|
||||
self.sample_dot_ghosts = sample_dot_ghosts
|
||||
@ -1541,8 +1541,8 @@ class TalkThroughXSquaredExample(IntroduceTransformationView):
|
||||
sample_dot_ghosts = sample_dots.copy().fade(0.5)
|
||||
|
||||
self.play(
|
||||
OldLaggedStart(DrawBorderThenFill, sample_dots),
|
||||
OldLaggedStart(FadeOut, int_arrows),
|
||||
LaggedStartMap(DrawBorderThenFill, sample_dots),
|
||||
LaggedStartMap(FadeOut, int_arrows),
|
||||
)
|
||||
self.remove(int_dot_ghosts)
|
||||
self.add(sample_dot_ghosts)
|
||||
@ -1954,8 +1954,8 @@ class XSquaredForNegativeInput(TalkThroughXSquaredExample):
|
||||
)
|
||||
sample_dots.set_fill(opacity=0.8)
|
||||
|
||||
self.play(OldLaggedStart(DrawBorderThenFill, sample_dots))
|
||||
self.play(OldLaggedStart(
|
||||
self.play(LaggedStartMap(DrawBorderThenFill, sample_dots))
|
||||
self.play(LaggedStartMap(
|
||||
ApplyFunction, sample_dots[len(sample_dots) / 2:0:-1],
|
||||
lambda mob: (
|
||||
lambda m: m.scale(2).shift(SMALL_BUFF * UP).set_color(PINK),
|
||||
@ -2064,7 +2064,7 @@ class IntroduceContinuedFractionPuzzle(PiCreatureScene):
|
||||
group.to_corner(UR)
|
||||
|
||||
self.play(
|
||||
OldLaggedStart(
|
||||
LaggedStartMap(
|
||||
Write, frac,
|
||||
run_time=15,
|
||||
lag_ratio=0.15,
|
||||
@ -2372,7 +2372,7 @@ class ThinkAboutWithRepeatedApplication(IntroduceContinuedFractionPuzzle):
|
||||
morty.change, "confused",
|
||||
friend.change, "confused",
|
||||
)
|
||||
self.play(OldLaggedStart(
|
||||
self.play(LaggedStartMap(
|
||||
ShowCreationThenDestruction, plus_rects,
|
||||
run_time=2,
|
||||
lag_ratio=0.35,
|
||||
@ -2400,9 +2400,9 @@ class ThinkAboutWithRepeatedApplication(IntroduceContinuedFractionPuzzle):
|
||||
question.next_to(arrow, RIGHT)
|
||||
|
||||
self.play(
|
||||
OldLaggedStart(FadeIn, question, run_time=1),
|
||||
LaggedStartMap(FadeIn, question, run_time=1),
|
||||
GrowArrow(arrow),
|
||||
OldLaggedStart(
|
||||
LaggedStartMap(
|
||||
ApplyMethod, frac,
|
||||
lambda m: (m.set_color, RED),
|
||||
rate_func=there_and_back,
|
||||
@ -2659,7 +2659,7 @@ class ShowRepeatedApplication(Scene):
|
||||
self.wait()
|
||||
|
||||
self.play(GrowFromEdge(line[5], LEFT))
|
||||
self.play(OldLaggedStart(GrowFromCenter, line[6]))
|
||||
self.play(LaggedStartMap(GrowFromCenter, line[6]))
|
||||
self.wait()
|
||||
|
||||
self.play(FadeIn(line[7]))
|
||||
@ -2956,7 +2956,7 @@ class AnalyzeFunctionWithTransformations(NumberlineTransformationScene):
|
||||
sample_dots.set_stroke(BLACK, 0.5)
|
||||
sample_points = list(map(Mobject.get_center, sample_dots))
|
||||
|
||||
self.play(OldLaggedStart(
|
||||
self.play(LaggedStartMap(
|
||||
FadeInFrom, sample_dots,
|
||||
lambda m: (m, UP)
|
||||
))
|
||||
@ -3013,9 +3013,9 @@ class AnalyzeFunctionWithTransformations(NumberlineTransformationScene):
|
||||
one_plus_rect = BackgroundRectangle(one_plus)
|
||||
one_plus_rect.set_fill(BLACK, opacity=0.8)
|
||||
|
||||
self.play(OldLaggedStart(GrowArrow, arrows))
|
||||
self.play(LaggedStartMap(GrowArrow, arrows))
|
||||
self.wait()
|
||||
self.play(OldLaggedStart(
|
||||
self.play(LaggedStartMap(
|
||||
ApplyMethod, arrows,
|
||||
lambda a: (a.scale, 0.7),
|
||||
rate_func=there_and_back,
|
||||
@ -3069,7 +3069,7 @@ class AnalyzeFunctionWithTransformations(NumberlineTransformationScene):
|
||||
return arrow
|
||||
|
||||
self.play(
|
||||
OldLaggedStart(
|
||||
LaggedStartMap(
|
||||
ApplyFunction, self.all_arrows,
|
||||
lambda a: (fade_arrow, a)
|
||||
),
|
||||
@ -3244,7 +3244,7 @@ class StabilityAndInstability(AnalyzeFunctionWithTransformations):
|
||||
arrows = VGroup(*[a for a in self.all_arrows if get_norm(a.get_start() - point) < 0.75]).copy()
|
||||
arrows.set_fill(PINK, 1)
|
||||
arrows.set_stroke(PINK, 3)
|
||||
arrows.second_anim = OldLaggedStart(
|
||||
arrows.second_anim = LaggedStartMap(
|
||||
ApplyMethod, arrows,
|
||||
lambda m: (m.set_color, YELLOW),
|
||||
rate_func=there_and_back_with_pause,
|
||||
@ -3314,7 +3314,7 @@ class StabilityAndInstability(AnalyzeFunctionWithTransformations):
|
||||
|
||||
for deriv_label, dot_group in zip(deriv_labels, dot_groups):
|
||||
self.play(FadeInFromDown(deriv_label))
|
||||
self.play(OldLaggedStart(GrowFromCenter, dot_group))
|
||||
self.play(LaggedStartMap(GrowFromCenter, dot_group))
|
||||
self.play(*list(map(MoveToTarget, dot_group)), run_time=2)
|
||||
self.wait()
|
||||
|
||||
@ -3338,7 +3338,7 @@ class StaticAlgebraicObject(Scene):
|
||||
polynomial.move_to(title)
|
||||
|
||||
self.add(title)
|
||||
self.play(OldLaggedStart(
|
||||
self.play(LaggedStartMap(
|
||||
GrowFromCenter, frac,
|
||||
lag_ratio=0.1,
|
||||
run_time=3
|
||||
@ -3433,7 +3433,7 @@ class TopicsAfterSingleVariable(PiCreatureScene, MoreTopics):
|
||||
creature.target.change(mode, self.other_topics)
|
||||
creatures.fade(1)
|
||||
|
||||
self.play(OldLaggedStart(MoveToTarget, creatures))
|
||||
self.play(LaggedStartMap(MoveToTarget, creatures))
|
||||
self.wait(2)
|
||||
|
||||
def zero_in_on_complex_analysis(self):
|
||||
@ -3445,8 +3445,8 @@ class TopicsAfterSingleVariable(PiCreatureScene, MoreTopics):
|
||||
complex_analysis.scale, 1.25,
|
||||
complex_analysis.center,
|
||||
complex_analysis.to_edge, UP,
|
||||
OldLaggedStart(FadeOut, self.other_topics),
|
||||
OldLaggedStart(FadeOut, self.lines),
|
||||
LaggedStartMap(FadeOut, self.other_topics),
|
||||
LaggedStartMap(FadeOut, self.lines),
|
||||
FadeOut(self.calculus),
|
||||
*[
|
||||
ApplyMethod(creature.change, "pondering")
|
||||
@ -3567,7 +3567,7 @@ class PrinciplesOverlay(PiCreatureScene):
|
||||
self.wait(4)
|
||||
self.play(FadeInFromDown(q_marks[0]))
|
||||
self.wait(2)
|
||||
self.play(OldLaggedStart(
|
||||
self.play(LaggedStartMap(
|
||||
FadeInFromDown, q_marks[1:],
|
||||
run_time=3
|
||||
))
|
||||
@ -3600,7 +3600,7 @@ class ManyInfiniteExpressions(Scene):
|
||||
power_tower.set_color_by_gradient(BLUE, GREEN)
|
||||
|
||||
self.play(*[
|
||||
OldLaggedStart(
|
||||
LaggedStartMap(
|
||||
GrowFromCenter, group,
|
||||
lag_ratio=0.1,
|
||||
run_time=8,
|
||||
|
Reference in New Issue
Block a user