mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-08-06 14:19:52 +08:00
pause() displays final frame not pre-final
This commit is contained in:
@ -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()
|
||||||
|
Reference in New Issue
Block a user