Resize 3D canvas size if window become too small