Hey Everyone,
I my project i have RUM logger enabled which is capturing the errors in browser.
I have my project in which i am using login to call some function when engine/scene is resized.
`
constructor(scene: Scene) {
this.scene = scene;
eventManager?.addEventListener(EventType.DRAG, this.onDrag);
eventManager?.addEventListener(EventType.ZOOM_INTO_AREA, this.onZoomIntoArea);
const engine = this.scene.getEngine();
this.canvasResizedObserver = engine.onResizeObservable.add(this.onCanvasResized);
}
`
callback body:
`
private onCanvasResized = (eventData: Engine, eventState: EventState): void => {
// console.log('canvas resized', eventData, eventState);
if (this.camera.orthoRight) {
// adjust top and bottom ortho values based on new aspect ratio
const size = this.getClientSize();
const aspect = size.height / size.width;
const newHalfCanvasHeightMeters = this.camera.orthoRight * aspect;
this.camera.orthoBottom = -newHalfCanvasHeightMeters;
this.camera.orthoTop = newHalfCanvasHeightMeters;
}`
I notice error with message is getting logged, and this is very frequent count. Did anyone know about it why it appears and what could be the potential solution for this ?
message:
ResizeObserver loop limit exceeded