Distortion when screen is resized [SOLVED]

Good afternoon guys,
I got a problem with the proportions of my model when screen is resized. Every Time that this occurs, the model stretches and when i do a simple click on the screen, it came back to normal.
The image above show what is happening.

Any idea of a solution?

Are you rendering every frame or using autoRender = false?

Good morning,

I’ve tried the both ways (autoRender as true and false). On both cases the problem above still happens, but with autoRender=false i need to call app.render() every frame and that is not what i want.

Today i found a solution!!

I don’t know why, but whenever I resize the screen, the camera attribute aspectRatioMode changes to 1 (pc.ASPECT_MANUAL). So I solved the problem by adding the code camera.aspectRatioMode = pc.ASPECT_AUTO on the resize screen event.

Thanks for the help!