/** * ( begin auto-generated from frameRate.xml ) * * Specifies the number of frames to be displayed every second. If the * processor is not fast enough to maintain the specified rate, it will not * be achieved. For example, the function call <b>frameRate(30)</b> will * attempt to refresh 30 times a second. It is recommended to set the frame * rate within <b>setup()</b>. The default rate is 60 frames per second. * * ( end auto-generated ) * @webref environment * @param fps number of desired frames per second * @see PApplet#frameRate * @see PApplet#frameCount * @see PApplet#setup() * @see PApplet#draw() * @see PApplet#loop() * @see PApplet#noLoop() * @see PApplet#redraw() */ public void frameRate(float fps) { surface.setFrameRate(fps); }