mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 10:27:46 +00:00
Fix dot updater in graph example
This commit is contained in:
parent
d644e3b184
commit
71814a118b
1 changed files with 1 additions and 4 deletions
|
|
@ -488,10 +488,7 @@ class GraphExample(Scene):
|
||||||
# with the intent of having other mobjects update based
|
# with the intent of having other mobjects update based
|
||||||
# on the parameter
|
# on the parameter
|
||||||
x_tracker = ValueTracker(2)
|
x_tracker = ValueTracker(2)
|
||||||
f_always(
|
dot.add_updater(lambda d: d.move_to(axes.i2gp(x_tracker.get_value(), parabola)))
|
||||||
dot.move_to,
|
|
||||||
lambda: axes.i2gp(x_tracker.get_value(), parabola)
|
|
||||||
)
|
|
||||||
|
|
||||||
self.play(x_tracker.animate.set_value(4), run_time=3)
|
self.play(x_tracker.animate.set_value(4), run_time=3)
|
||||||
self.play(x_tracker.animate.set_value(-2), run_time=3)
|
self.play(x_tracker.animate.set_value(-2), run_time=3)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue