How set aspect ratio for orthographic camera

The camera image is stretched on my smartphone, I can solve this by setting camera.aspect to PerspectiveCamera, but OrthographicCamera has no such property.

The code from the ‘ThreeJS’ documentation doesn’t work

ref.current.left = SCREEN_WIDTH / -2
ref.current.right = SCREEN_WIDTH / 2
ref.current.top = SCREEN_HEIGHT / 2
ref.current.bottom = SCREEN_HEIGHT / -2

Hi!
Have a look at the source code of this example, and you’ll see these two lines: three.js/webgl_interactive_cubes_ortho.html at 1a241ef10048770d56e06d6cd6a64c76cc720f95 · mrdoob/three.js · GitHub

It partially worked, but I don’t think it’s quite accurate.
Zoom: 1


Zoom: 4
image
You can see that with zoom = 4, part of the image is missing as if it were slightly vertically compressed, how do I avoid this, I work in react native and I think this is because the width and height of the canvas are not integers, which depends on the display size of the device, but this is just my assumption. How can I fine tune the aspect ratio?

EDIT: I need 1 pixel of a texture to correspond to 1 pixel on the device display