diff --git a/src/Three.Legacy.js b/src/Three.Legacy.js index d9e5f7d29ee08bd8f9bdf466bfa41aa42741686b..1764973b7c51a0f1dd6a0f6d8f00e151c990bf49 100644 --- a/src/Three.Legacy.js +++ b/src/Three.Legacy.js @@ -1683,20 +1683,6 @@ Object.defineProperties( WebGLRenderTarget.prototype, { // -Object.defineProperties( WebVRManager.prototype, { - - standing: { - set: function ( /* value */ ) { - - console.warn( 'THREE.WebVRManager: .standing has been removed.' ); - - } - } - -} ); - -// - Audio.prototype.load = function ( file ) { console.warn( 'THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.' ); diff --git a/src/renderers/webvr/WebVRManager.js b/src/renderers/webvr/WebVRManager.js index 7c3a666e735ec4a1f7d638d40a2e925cb2166168..9ce3d8206d22b9b232c5fe3e7f6b5accd04e378e 100644 --- a/src/renderers/webvr/WebVRManager.js +++ b/src/renderers/webvr/WebVRManager.js @@ -174,6 +174,7 @@ function WebVRManager( renderer ) { this.enabled = false; this.userHeight = 1.6; + this.standing = false; this.getController = function ( id ) { @@ -229,15 +230,19 @@ function WebVRManager( renderer ) { // - var stageParameters = device.stageParameters; + if ( this.standing ) { - if ( stageParameters ) { + var stageParameters = device.stageParameters; - standingMatrix.fromArray( stageParameters.sittingToStandingTransform ); + if ( stageParameters ) { - } else { + standingMatrix.fromArray( stageParameters.sittingToStandingTransform ); + + } else { + + standingMatrix.makeTranslation( 0, scope.userHeight, 0 ); - standingMatrix.makeTranslation( 0, scope.userHeight, 0 ); + } } @@ -287,8 +292,12 @@ function WebVRManager( renderer ) { standingMatrixInverse.getInverse( standingMatrix ); - cameraL.matrixWorldInverse.multiply( standingMatrixInverse ); - cameraR.matrixWorldInverse.multiply( standingMatrixInverse ); + if ( this.standing ) { + + cameraL.matrixWorldInverse.multiply( standingMatrixInverse ); + cameraR.matrixWorldInverse.multiply( standingMatrixInverse ); + + } var parent = poseObject.parent;