frameRate()
changes the number of frames drawn per second
Last updated
changes the number of frames drawn per second
Last updated
10 frames are drawn per second so the image refreshes quite slowly
60 frames are drawn per second so the image refreshes very rapidly
Sets the number of frames to draw every second on the canvas. For example, frameRate(10) will cause the canvas to attempt to refresh 10 times per second.
The default frame rate is 60 frames per second (fps), if the device cannot draw at the specified fps, it will draw at the highest fps possible.
Input | Description |
---|---|
Find these documents helpful? Let the people who made them help your child learn to code at Strivemath!
We'd love to hear your Feedback/Comments here.
fps
number of frames per second to be set