|
@@ -28,7 +28,7 @@ Object.assign( StereoCamera.prototype, {
|
|
|
|
|
|
update: ( function () {
|
|
|
|
|
|
- var instance, focus, fov, aspect, near, far, zoom;
|
|
|
+ var instance, focus, fov, aspect, near, far, zoom, eyeSep;
|
|
|
|
|
|
var eyeRight = new Matrix4();
|
|
|
var eyeLeft = new Matrix4();
|
|
@@ -37,7 +37,7 @@ Object.assign( StereoCamera.prototype, {
|
|
|
|
|
|
var needsUpdate = instance !== this || focus !== camera.focus || fov !== camera.fov ||
|
|
|
aspect !== camera.aspect * this.aspect || near !== camera.near ||
|
|
|
- far !== camera.far || zoom !== camera.zoom;
|
|
|
+ far !== camera.far || zoom !== camera.zoom || eyeSep !== this.eyeSep;
|
|
|
|
|
|
if ( needsUpdate ) {
|
|
|
|
|
@@ -53,7 +53,7 @@ Object.assign( StereoCamera.prototype, {
|
|
|
// http://paulbourke.net/stereographics/stereorender/
|
|
|
|
|
|
var projectionMatrix = camera.projectionMatrix.clone();
|
|
|
- var eyeSep = this.eyeSep / 2;
|
|
|
+ eyeSep = this.eyeSep / 2;
|
|
|
var eyeSepOnProjection = eyeSep * near / focus;
|
|
|
var ymax = ( near * Math.tan( _Math.DEG2RAD * fov * 0.5 ) ) / zoom;
|
|
|
var xmin, xmax;
|