🧪 Version 0.2.2 is our alpha release candidate. Please send us bug reports and suggestions!

Sketchingpy

Creative coding and interactive science everywhere for everyone: web, desktop, mobile, Jupyter, and more. Open source!

Reference for set_fps

Indicate how fast the sketch should redraw. This is part of the reference section.

Purpose

Indicate a target frames per second that the sketch will take a "step" or redraw. Note that this is a goal and, if the system fall behind, it will drop frames and cause the on_step callback to be executed fewer times than the target.

Snippet

Ask the sketch to redraw 10 times per second.
sketch.set_fps(10)

Parameters

  • rate: The number of frames to try to draw per second.

Examples

Availability

Available for Sketch2DApp and Sketch2DWeb.

See also