In other words, can we choose to invoke the handler at 20 times per second, or at 45 times per second, or must it be 60 times per second?
I guess one way to simulate it will be to use the timestamp given to the handler to determine if it is "time for action yet" -- if not, simply return without doing anything?
You can use the frameInterval
property to invoke the handler every 60/n
frames, where n
is a positive integer.
You can't invoke the handler 45
times per second, but the following values are possible: 60
, 30
, 20
, 15
, 12
, ...