Detect Device Orientation Landscape

I want to ask for our project.

In this project we use Universal SDK which is ThreeJS, so I want to ask about how the camera or browser can detect device orientation landscape.

In this case (like in screenshot), I want the button & popup follow the device orientation landscape.x

1 Like

Hi @asepirman,

I believe that I have answered your ticket, but just in case this is helpful:

Luckily, this should be pretty easy for you to do, depending on how you’ve included your buttons and UI! For example, the web browser actually has a Screen.orientation value which you can learn more about here: https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation. This is a Web API.

Additionally, if your content is in Three.js but your UI is in HTML and CSS elements, you can also use pure CSS - more about that here.

Have a great day!
Francesca :blush: