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
It partially worked, but I don’t think it’s quite accurate.
Zoom: 1
Zoom: 4

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