Closed konstantin55000 closed 4 years ago
i really need this answer for quesion: if there any possibility to change lence device frame , eq make lence frame x2 wider with the same height, but to preserve lence from distortion. Also viewport and canvas width should not be toched, just to simple reason : objects must be not distorted (not appear wider than needed). Please look at this screenshot http://prntscr.com/py3fre here white cursor is whider (ellypse form, need to stay circle), but lence should be this wide (width *2) I've looked through most methods inside cardborad-vr-display and webvr-polyfill, but yet not found solution. How it can be achieved?
Has been kinda figured:
added into DeviceInfo.prototype.getLeftEyeVisibleScreenRect = function (undistortedFrustum) {
var viewer = this.viewer;
var device = this.device;
var dist = viewer.screenLensDistance;
var eyeX = (device.widthMeters - viewer.interLensDistance) / 2;
..
var left = (undistortedFrustum[0] dist + eyeX) / device.widthMeters;
...
return {
x: left,
y: bottom,
width: (right - left ) viewer.lenceWidthMultiplier,
height: (top - bottom) * viewer.lenceHeightMultiplier
};
}; also in cardboardViewer added
function CardboardViewer(params) { this.lenceHeightMultiplier = 0.84; this.lenceWidthMultiplier = 1.5;
but maybe you' have more elegant solution. please let me know.
Hello, sorry for posting here in issue thread.