Device orientation event changing camera position

I have a plane geometry. I wanted to move the camera position according to the device orientation . Like mouse hovering box tilting effect. I don’t understanding the connection between the alpha, beta, gamma rotation degree result and how it can change the camera position.

Like an example

camera.position.z += 0.01 update the position of the camera when gamma value change left or right mobile orientation change

pls share code so we can recreate the event