-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Description
Description of bug / unexpected behavior
Playing animations with the dt-updater added results in duplicate frames. This issue is especially noticeable at low FPS or when using TracedPath.
Code for reproducing the problem
config.frame_rate = 5
class DtUpdaterBug(Scene):
def construct(self):
circle = Circle().set_fill(RED, 1).to_edge(LEFT)
def upd_circle(mob, dt):
mob.shift(2 * dt * RIGHT)
def upd_cnt(cnt, dt):
cnt.increment_value(dt * config.frame_rate)
counter = Integer().shift(UP * 2).add_updater(upd_cnt)
circle.add_updater(upd_circle)
self.add(counter, circle)
self.wait(2)
error = Text("Error: extra frame for every animation")
self.add(error.to_edge(UP).scale(0.6))
for _ in range(5):
self.play(Animation(VMobject()), run_time=1 / 5)
self.wait(3 / 5)
self.remove(error)
self.wait(2)Additional comments
https://discord.com/channels/1453870851807117363/1463725322313666655
DtUpdaterBug.mp4
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels