Closed slash9494 closed 2 years ago
can you share a repro - perhaps on codepen? I have never seen that before. sounds like you are saying that when you use devtools that it stops.... the render loop is running on the Engine automatically. Otherwise if you can share code here.
i find that my fps update state have made it render infinitely 😅
i think this code setFps(engine?.getFps() || 0 )
could generate useEngine
thanks for sharing the solution. setFps
looks like a useState
- that will cause a React render - not good performance to call every frame - poor performance. Better to do that outside of React - on the canvas or vanilla js. Glad you solved it 😄
i found infinite render loop when i used hooks ( useScene, useEngine) in components (such as light, model)
but i have not been aware of it if i don't use dev tools like console and it seems to be alright
is it normal situation ?