Language \ Environment \ Comparison
 
Index
 
  The Processing 1.0 _ALPHA_ Reference is a work in progress.
If you see any errors or have any comments, please write to: reas at groupc.net
Name  

framerate()

   
Examples  
void setup() { 
  framerate(4); 
} 
int pos = 0; 
void loop() { 
  background(204); 
  pos++; 
  line(pos, 20, pos, 80); 
  if(pos > width) { 
    pos = 0; 
  } 
} 
Description   Specifies the number of frames to be displayed every second. If the processor is not fast enough to maintain this rate, the frames will not display at the specified rate. The function call framerate(30) will attempt to refresh 30 times a second.
   
Syntax  
framerate(fps)
   
Parameters  
fps   int: number of frames per second

   
Returns   None
   
Usage   Web & Application
   
Related   delay()
   
© 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas