FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Language \ Environment \ Libraries \ Comparison
 
   
   
Abridged (A-Z) \ Complete (A-Z)  
   
  Reference for Processing (BETA) version 91+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.  
Name  

framerate()

   
Examples  
void setup() { 
  framerate(4); 
} 
int pos = 0; 
void draw() { 
  background(204); 
  pos++; 
  line(pos, 20, pos, 80); 
  if(pos > width) { 
    pos = 0; 
  } 
} 

Description   Specifies the number of frames to be displayed every second. This is acheived by calling delay() at the end of the draw() to slow down the display. If the processor is not fast enough to maintain the specified rate, it will not be acheived. For example, the function call framerate(30) will attempt to refresh 30 times a second. It is recommended to set the framerate within tsetup().
   
Syntax  
framerate(fps)
   
Parameters  
fps   int: number of frames per second

   
Returns   None
   
Usage   Web & Application
   
Related   delay()
 
 






   
 
Updated: Fri Jul 15 16:35:40 PDT 2005
 
 








Creative Commons License
 
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info