mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 19:46:21 +08:00
LaggedStart -> OldLaggedStart
This commit is contained in:
@ -357,11 +357,11 @@ class ExampleThrees(PiCreatureScene):
|
||||
|
||||
self.play(
|
||||
FadeIn(three_mob[0]),
|
||||
LaggedStart(FadeIn, three_mob[1])
|
||||
OldLaggedStart(FadeIn, three_mob[1])
|
||||
)
|
||||
self.wait()
|
||||
self.play(
|
||||
LaggedStart(
|
||||
OldLaggedStart(
|
||||
DrawBorderThenFill, three_mob_copy,
|
||||
run_time = 3,
|
||||
stroke_color = WHITE,
|
||||
@ -577,13 +577,13 @@ class WriteAProgram(Scene):
|
||||
choices.next_to(arrow, RIGHT)
|
||||
|
||||
self.play(
|
||||
LaggedStart(DrawBorderThenFill, three),
|
||||
OldLaggedStart(DrawBorderThenFill, three),
|
||||
ShowCreation(three_rect)
|
||||
)
|
||||
self.play(Write(numbers))
|
||||
self.play(
|
||||
ShowCreation(arrow),
|
||||
LaggedStart(FadeIn, choices),
|
||||
OldLaggedStart(FadeIn, choices),
|
||||
)
|
||||
|
||||
rect = SurroundingRectangle(choices[0], buff = SMALL_BUFF)
|
||||
@ -1147,7 +1147,7 @@ class IntroduceEachLayer(PreviewMNistNetwork):
|
||||
)
|
||||
)
|
||||
|
||||
self.play(LaggedStart(FadeIn, numbers))
|
||||
self.play(OldLaggedStart(FadeIn, numbers))
|
||||
self.play(
|
||||
MoveToTarget(example_neuron),
|
||||
MoveToTarget(example_num)
|
||||
@ -1230,7 +1230,7 @@ class IntroduceEachLayer(PreviewMNistNetwork):
|
||||
self.wait()
|
||||
for edge_group, layer in zip(network_mob.edge_groups, network_mob.layers[1:]):
|
||||
self.play(
|
||||
LaggedStart(FadeIn, layer, run_time = 1),
|
||||
OldLaggedStart(FadeIn, layer, run_time = 1),
|
||||
ShowCreation(edge_group),
|
||||
)
|
||||
self.wait()
|
||||
@ -1271,7 +1271,7 @@ class IntroduceEachLayer(PreviewMNistNetwork):
|
||||
)
|
||||
|
||||
self.play(ShowCreation(rect))
|
||||
self.play(LaggedStart(FadeIn, labels))
|
||||
self.play(OldLaggedStart(FadeIn, labels))
|
||||
self.wait()
|
||||
self.play(
|
||||
MoveToTarget(neuron),
|
||||
@ -1345,7 +1345,7 @@ class DiscussChoiceForHiddenLayers(TeacherStudentsScene):
|
||||
for words in two_words, sixteen_words:
|
||||
words.next_to(rects, UP)
|
||||
|
||||
neurons_anim = LaggedStart(
|
||||
neurons_anim = OldLaggedStart(
|
||||
Indicate,
|
||||
VGroup(*it.chain(*[layer.neurons for layer in layers])),
|
||||
rate_func = there_and_back,
|
||||
@ -1467,7 +1467,7 @@ class AskAboutLayers(PreviewMNistNetwork):
|
||||
|
||||
self.play(
|
||||
Write(question, run_time = 1),
|
||||
LaggedStart(
|
||||
OldLaggedStart(
|
||||
GrowFromPoint, arrows,
|
||||
lambda a : (a, a.get_start()),
|
||||
run_time = 2
|
||||
@ -1616,7 +1616,7 @@ class BreakUpMacroPatterns(IntroduceEachLayer):
|
||||
self.play(ReplacementTransform(
|
||||
self.right_line.copy(), right_line
|
||||
))
|
||||
self.play(LaggedStart(
|
||||
self.play(OldLaggedStart(
|
||||
FadeIn, VGroup(*equation[3:])
|
||||
))
|
||||
self.wait(2)
|
||||
@ -1700,7 +1700,7 @@ class BreakUpMacroPatterns(IntroduceEachLayer):
|
||||
edge_group = self.network_mob.edge_groups[-1].copy()
|
||||
edge_group.set_stroke(YELLOW, 4)
|
||||
for x in range(3):
|
||||
self.play(LaggedStart(
|
||||
self.play(OldLaggedStart(
|
||||
ShowCreationThenDestruction, edge_group,
|
||||
run_time = 3
|
||||
))
|
||||
@ -1809,7 +1809,7 @@ class BreakUpMicroPatterns(BreakUpMacroPatterns):
|
||||
)
|
||||
self.play(Blink(randy))
|
||||
self.wait()
|
||||
self.play(LaggedStart(
|
||||
self.play(OldLaggedStart(
|
||||
ApplyMethod, edges,
|
||||
lambda e : (e.restore,),
|
||||
run_time = 4
|
||||
@ -1857,10 +1857,10 @@ class BreakUpMicroPatterns(BreakUpMacroPatterns):
|
||||
randy.change, "hesitant", line
|
||||
)
|
||||
self.play(Blink(randy))
|
||||
self.play(LaggedStart(FadeIn, digits))
|
||||
self.play(OldLaggedStart(FadeIn, digits))
|
||||
self.wait()
|
||||
self.play(
|
||||
LaggedStart(FadeIn, Group(*equation[1:])),
|
||||
OldLaggedStart(FadeIn, Group(*equation[1:])),
|
||||
randy.change, "pondering", equation
|
||||
)
|
||||
self.wait(3)
|
||||
@ -2162,12 +2162,12 @@ class ManyTasksBreakDownLikeThis(TeacherStudentsScene):
|
||||
self.wait()
|
||||
self.play(
|
||||
GrowFromPoint(arrows[1], arrows[1].get_start()),
|
||||
LaggedStart(FadeIn, syllables, run_time = 1)
|
||||
OldLaggedStart(FadeIn, syllables, run_time = 1)
|
||||
)
|
||||
self.wait()
|
||||
self.play(
|
||||
GrowFromPoint(arrows[2], arrows[2].get_start()),
|
||||
LaggedStart(FadeIn, word, run_time = 1)
|
||||
OldLaggedStart(FadeIn, word, run_time = 1)
|
||||
)
|
||||
self.wait()
|
||||
|
||||
@ -2346,8 +2346,8 @@ class IntroduceWeights(IntroduceEachLayer):
|
||||
GrowFromPoint(arrow, arrow.get_start()),
|
||||
pixels_group.set_height, 3,
|
||||
pixels_group.to_edge, RIGHT,
|
||||
LaggedStart(FadeIn, p_labels),
|
||||
LaggedStart(FadeIn, decimals),
|
||||
OldLaggedStart(FadeIn, p_labels),
|
||||
OldLaggedStart(FadeIn, decimals),
|
||||
)
|
||||
self.wait()
|
||||
self.play(
|
||||
@ -2405,7 +2405,7 @@ class IntroduceWeights(IntroduceEachLayer):
|
||||
for decimal, r in zip(decimals, random_numbers)
|
||||
]
|
||||
)
|
||||
self.play(LaggedStart(
|
||||
self.play(OldLaggedStart(
|
||||
ApplyMethod, edges,
|
||||
lambda m : (m.rotate_in_place, np.pi/24),
|
||||
rate_func = wiggle,
|
||||
@ -2917,7 +2917,7 @@ class IncludeBias(IntroduceWeights):
|
||||
weight_grid = self.weight_grid
|
||||
bias_name = self.bias_name
|
||||
|
||||
self.play(LaggedStart(
|
||||
self.play(OldLaggedStart(
|
||||
ApplyMethod, weight_grid,
|
||||
lambda p : (p.set_fill,
|
||||
random.choice([GREEN, GREEN, RED]),
|
||||
@ -3044,13 +3044,13 @@ class ShowRemainingNetwork(IntroduceWeights):
|
||||
)
|
||||
last_edges = edges
|
||||
self.play(
|
||||
LaggedStart(
|
||||
OldLaggedStart(
|
||||
ShowCreation, VGroup(*[
|
||||
n.edges_in for n in neurons[7:]
|
||||
]),
|
||||
run_time = 3,
|
||||
),
|
||||
LaggedStart(
|
||||
OldLaggedStart(
|
||||
FadeIn, VGroup(*neurons[7:]),
|
||||
run_time = 3,
|
||||
),
|
||||
@ -3075,7 +3075,7 @@ class ShowRemainingNetwork(IntroduceWeights):
|
||||
|
||||
self.play(
|
||||
FadeIn(words),
|
||||
LaggedStart(
|
||||
OldLaggedStart(
|
||||
GrowArrow, arrows,
|
||||
run_time = 3,
|
||||
lag_ratio = 0.3,
|
||||
@ -3110,7 +3110,7 @@ class ShowRemainingNetwork(IntroduceWeights):
|
||||
FadeOut(bb1),
|
||||
ReplacementTransform(bb2, bias_count[1]),
|
||||
FadeOut(bb3),
|
||||
LaggedStart(FadeOut, bias_arrows)
|
||||
OldLaggedStart(FadeOut, bias_arrows)
|
||||
)
|
||||
self.wait()
|
||||
|
||||
@ -3151,12 +3151,12 @@ class ShowRemainingNetwork(IntroduceWeights):
|
||||
MoveToTarget(bias_count),
|
||||
Write(added_weights, run_time = 1),
|
||||
Write(added_biases, run_time = 1),
|
||||
LaggedStart(
|
||||
OldLaggedStart(
|
||||
ShowCreation, edges,
|
||||
run_time = 4,
|
||||
lag_ratio = 0.3,
|
||||
),
|
||||
LaggedStart(
|
||||
OldLaggedStart(
|
||||
FadeIn, neurons,
|
||||
run_time = 4,
|
||||
lag_ratio = 0.3,
|
||||
@ -3213,7 +3213,7 @@ class ShowRemainingNetwork(IntroduceWeights):
|
||||
width = 3*random.random()**7
|
||||
)
|
||||
self.play(
|
||||
LaggedStart(
|
||||
OldLaggedStart(
|
||||
MoveToTarget, edges,
|
||||
lag_ratio = 0.6,
|
||||
run_time = 2,
|
||||
@ -3529,7 +3529,7 @@ class IntroduceWeightMatrix(NetworkScene):
|
||||
pre_brackets.set_fill(opacity = 0)
|
||||
|
||||
self.play(FocusOn(self.a_labels[0]))
|
||||
self.play(LaggedStart(
|
||||
self.play(OldLaggedStart(
|
||||
Indicate, self.a_labels,
|
||||
rate_func = there_and_back,
|
||||
run_time = 1
|
||||
@ -3541,7 +3541,7 @@ class IntroduceWeightMatrix(NetworkScene):
|
||||
)
|
||||
self.wait()
|
||||
self.play(*[
|
||||
LaggedStart(Indicate, mob, rate_func = there_and_back)
|
||||
OldLaggedStart(Indicate, mob, rate_func = there_and_back)
|
||||
for mob in (a_labels, a_labels_in_sum)
|
||||
])
|
||||
self.wait()
|
||||
@ -3613,7 +3613,7 @@ class IntroduceWeightMatrix(NetworkScene):
|
||||
|
||||
self.play(ShowCreation(rect))
|
||||
for x in range(2):
|
||||
self.play(LaggedStart(
|
||||
self.play(OldLaggedStart(
|
||||
ShowCreationThenDestruction, edges,
|
||||
lag_ratio = 0.8
|
||||
))
|
||||
@ -3664,7 +3664,7 @@ class IntroduceWeightMatrix(NetworkScene):
|
||||
VGroup(top_row_rect, column_rect).copy(),
|
||||
result_terms[0]
|
||||
))
|
||||
self.play(LaggedStart(
|
||||
self.play(OldLaggedStart(
|
||||
FadeIn, VGroup(*result_terms[1:])
|
||||
))
|
||||
self.wait(2)
|
||||
@ -3691,7 +3691,7 @@ class IntroduceWeightMatrix(NetworkScene):
|
||||
rowk = self.lower_matrix_rows[-1]
|
||||
|
||||
def show_edges(neuron):
|
||||
self.play(LaggedStart(
|
||||
self.play(OldLaggedStart(
|
||||
ShowCreationThenDestruction,
|
||||
neuron.edges_in.copy().set_stroke(GREEN, 5),
|
||||
lag_ratio = 0.7,
|
||||
@ -3755,7 +3755,7 @@ class IntroduceWeightMatrix(NetworkScene):
|
||||
Transform(self.bias[1].copy(), b_column[0]),
|
||||
run_time = 1
|
||||
)
|
||||
self.play(LaggedStart(
|
||||
self.play(OldLaggedStart(
|
||||
FadeIn, VGroup(*b_column[1:])
|
||||
))
|
||||
self.wait()
|
||||
@ -4052,7 +4052,7 @@ class NeuronIsFunction(MoreHonestMNistNetworkPreview):
|
||||
FadeOut(self.network_mob),
|
||||
*list(map(Animation, [neuron, edges, prev_layer]))
|
||||
)
|
||||
self.play(LaggedStart(
|
||||
self.play(OldLaggedStart(
|
||||
ShowCreationThenDestruction,
|
||||
edges.copy().set_stroke(YELLOW, 4),
|
||||
))
|
||||
@ -4278,7 +4278,7 @@ class NextVideo(MoreHonestMNistNetworkPreview, PiCreatureScene):
|
||||
video.move_to(pair, LEFT)
|
||||
pair.target = video
|
||||
|
||||
self.play(LaggedStart(
|
||||
self.play(OldLaggedStart(
|
||||
MoveToTarget, neuron_pairs,
|
||||
run_time = 3
|
||||
))
|
||||
|
Reference in New Issue
Block a user