So I have a scene/project that is way to complex to remake in a PG buuuuut am hoping someone might have an idea where I could start looking to solve this.
Essentially once and a while it seems like the engine.onResizeObservable continually fires after one time.
I have come to this conclusion because I have a scene optimizer that reruns after a set time after a resize but it was constantly outputting that it was resting.
So I stripped everything down and just did
engine.onResizeObservable.add(()=>{
console.log(“EngineResize”)
})
and it started just firing that constantly after the initial window resize.
Assumingly this is a client/project problem but I kind of am at a loss of where to dig for this because it does not do it in a PG.
Only guess I can think of is if you added a callback to onResizeObservable that calls engine.resize() or calls something else that eventually calls that, creating an infinite cycle…
Using the PG, you can see an example of the second issue I mentioned by commenting out the removeEventListener. If you do, then every time you click play will result in an additional log event upon resize. At least until you reload the page in the browser, which clears all listeners.