Please check the following PG.
In this playground I’ve set the custom hardware scaling level (to 0.6).
Now if you look at dev tools console, the resize!
log is output there each frame, which I assume is the result of engine.resize()
being called at each frame, and since scaling level is different from 1, the condition in Engine.prototype.setSize
that should prevent onResizeObservable
from notifying its observers, always returns false.
Is this an expected behaviour?
I’m asking because I was going to ask a similar question regarding why engine.resize()
is called for each frame when debug layer is shown (check this line Babylon.js/inspector.ts at master · BabylonJS/Babylon.js · GitHub) which makes using debug layer harder, because we have quite heavy listeners for this resize event. But i can’t really show the problem in the playground because even if there is no debug layer, resize
is still called there on each frame