Py5Surface.resume_thread()#

Resume a paused Sketch.

Examples#

 1def draw():
 2    py5.rect(py5.random(py5.width), py5.random(py5.height), 10, 10)
 3    py5.println(py5.frame_count)
 4
 5py5.run_sketch(block=False)
 6surface = py5.get_surface()
 7
 8# pause the sketch.
 9surface.pause_thread()
10# the sketch is no longer running and there is no output
11
12# after waiting a bit, resume the sketch
13surface.resume_thread()

Description#

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

Syntax#

resume_thread() -> None

Updated on November 12, 2021 11:30:58am UTC