I have a project and I want it to run on a PC or a mobile terminal, but different devices have different initial visible areas of the camera. How can I get this angle? For example, camera.fov defaults to 80, but it may actually only be 50 on the mobile terminal. How can I accurately obtain my current visual range?
Asked
Active
Viewed 239 times
1 Answers
1
It's hard to know without a link to code, but here's a simple way to get FOV from an A-Frame scene.
For example, on this scene: https://aframe.glitch.me/
You can open the console and type:
> AFRAME.scenes[0].camera.fov
And you'll get an answer such as:
> 80

Kieran F.
- 567
- 4
- 16
-
Take your example, the viewing angle is 80, but my screen width becomes smaller, my actual viewing angle is not 80 – blueblueskyhua Nov 24 '20 at 07:57
-
Here are a couple relevant SO questions: - https://stackoverflow.com/questions/13350875/three-js-width-of-view/13351534#13351534 https://stackoverflow.com/questions/15331358/three-js-get-object-size-with-respect-to-camera-and-object-position-on-screen/15331885#15331885 – Kieran F. Nov 24 '20 at 19:37