pause() displays final frame not pre-final

This commit is contained in:
Linus Heck
2021-06-18 14:43:06 +02:00
parent 2a136ed585
commit c5274fb57f

View File

@ -2,6 +2,7 @@ import os
import json import json
import shutil import shutil
from manim import Scene, config from manim import Scene, config
from manim.animation.animation import Wait
class Slide(Scene): class Slide(Scene):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@ -18,6 +19,7 @@ class Slide(Scene):
self.current_animation += 1 self.current_animation += 1
def pause(self): def pause(self):
self.play(Wait(1.0 / config["frame_rate"]))
self.slides.append(dict( self.slides.append(dict(
type="slide", type="slide",
start_animation=self.pause_start_animation, start_animation=self.pause_start_animation,
@ -79,4 +81,4 @@ class Slide(Scene):
slides=self.slides, slides=self.slides,
files=files files=files
), f) ), f)
f.close() f.close()