I’m having a demo where I need the frameRate to be set to 5.
But later on the demo I need to reset the frameRate to the default one.
I don’t want to set a fixed value frameRate(30) as I want my frameRate to follow the default requestAnimationFrame callback method.
How could I “reset” the frameRate to its initial value?
I’m not familiar with Processing, but P5.js can go faster than 60fps since the frame rate is linked to the screen refresh rate.
And I don’t want to set frameRate(200) as it won’t be useful for most of the users.
I do understand the first answer and the end result would indeed be the same.
In my case I wanted to know if there was a way to reset the frameRate setting to its default.
Since you can set a specific frameRate I was interested to know if there was a way to do the opposite like frameRate(AUTO).
I looked into the source code but I couldn’t find anything
(For my specific case, I’m showing demos to beginners and I don’t want to overload them with more logic & code outside of P5)