aneelbakshi
Mar 7, 2007, 02:50 AM
how I can use setInterval
I know
1 second=1000 millisecond
but I'm confuse that how
10 fps==100 milliseconds
explain
Capuchin
Mar 7, 2007, 02:53 AM
The time between frames is the inverse of frames per second
\frac{1000 milliseconds}{10 fps} = 100 milliseconds
In other words, each of the 10 frames are on for 100 milliseconds, which has to add up to a total time of 1 second
10*100 = 1000milliseconds, which is a second.
Capuchin
Mar 7, 2007, 03:07 AM
Hi, as you are still confused I will try again.
You have 10 frames per second.
This means 10 frames in every second.
To work out the time for each frame, you need to split up the second into equal amounts.
Because you have 10 frames per second, you need to split the second up into 10 equal amounts.
this is done by division: \frac{1 second}{10 frames per second} = 0.1 seconds for each frame, this is 100 milliseconds using the conversion that you say you understand.