While trying to render a WebGL animation using requestAnimationFrame, I noticed that it runs at 60fps for a period of time before suddenly dropping down to 1 fps. After approximately 500-1000ms, it goes back up to 60 FPS again. I am utilizing three.js to handle matrix calculations and render the model, but I am quite baffled by this behavior. Any assistance on this matter would be greatly appreciated. Thank you for taking the time to help.
You can find my codepen link here:
https://codepen.io/xiaoshaung/pen/MOgXmN