Resume a paused Sketch.
def draw(): py5.rect(py5.random(py5.width), py5.random(py5.height), 10, 10) py5.println(py5.frame_count) py5.run_sketch(block=False) surface = py5.get_surface() # pause the sketch. surface.pause_thread() # the sketch is no longer running and there is no output # after waiting a bit, resume the sketch surface.resume_thread()
Resume a paused Sketch. The Sketch window will resume operating as it did before Py5Surface.pause_thread() was called.
The frame_count will continue incrementing after the Sketch is resumed.
Underlying Processing method: PSurface.resumeThread
resume_thread() -> None
Updated on March 06, 2023 02:49:26am UTC