Closed alfski closed 8 years ago
Right, I thought I needed to get the aspect ratio in the form of "16:9", and hence did the GCD. I realize now that we only need it for computation purpose and not displaying! Will fix this, also I think for some reason screen.height and screen.width do not get the correct browser window size, I will look into it.
my guess is it should be this document.body.clientWidth / clientHeight
Yeah! I have tested it at my end, by resizing the window and aspect ratio changes.
Clients need to divide HorizFOV by aspectratio now that it is width/height...
viewer.camera.frustum.fov = toRadians(CONFIG.slaveHorizFOV / getAspectRatio());
Hi @alfski, Does this work for you now? If yes, then we can go ahead and close this issue.
seems to be working now.
I'm not sure why you need to check for greatest common divisor? With 16:9 screen.width is still the horizontal and screen.height the vertical.
This worked...
hmm... probably should be width / height, and then divide the HorizFov in the clients.