Skip to content

Commit d6abbd7

Browse files
committed
Updated VREffect.
1 parent 5689238 commit d6abbd7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/js/effects/VREffect.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ THREE.VREffect = function ( renderer, onError ) {
111111
var layers = vrDisplay.getLayers();
112112
if ( layers.length ) {
113113

114-
leftBounds = layers[0].leftBounds || [ 0.0, 0.0, 0.5, 1.0 ];
115-
rightBounds = layers[0].rightBounds || [ 0.5, 0.0, 0.5, 1.0 ];
114+
var layer = layers[0];
115+
116+
leftBounds = layer.leftBounds !== null && layer.leftBounds.length === 4 ? leftBounds : [ 0.0, 0.0, 0.5, 1.0 ];
117+
rightBounds = layer.rightBounds !== null && layer.rightBounds.length === 4 ? rightBounds : [ 0.5, 0.0, 0.5, 1.0 ];
116118

117119
}
118120

0 commit comments

Comments
 (0)