From ccb9977a67f65b6a957cdc83be726655fcf7fa50 Mon Sep 17 00:00:00 2001 From: zhujisheng <30714273+zhujisheng@users.noreply.github.com> Date: Mon, 23 Sep 2024 23:48:18 +0800 Subject: [PATCH] Update scene.py to make scene.time more accurate When the time intervals are (0, dt, 2dt, ...), during the first frame processing, only the video is inserted, but the update parameter is 0, which causes scene.time to be inaccurate. The correct time intervals should be (dt, 2dt, ...) --- manimlib/scene/scene.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manimlib/scene/scene.py b/manimlib/scene/scene.py index f73fb088..18199fba 100644 --- a/manimlib/scene/scene.py +++ b/manimlib/scene/scene.py @@ -552,7 +552,7 @@ class Scene(object): if self.skip_animations and not override_skip_animations: return [run_time] - times = np.arange(0, run_time, 1 / self.camera.fps) + times = np.arange(0, run_time, 1 / self.camera.fps) + 1 / self.camera.fps self.file_writer.set_progress_display_description(sub_desc=desc)