Skip to content

Commit

Permalink
VRControls/VREffect: Added getVRDisplay. See #9133 #9252.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jun 30, 2016
1 parent 3be3e5e commit c1c8b4a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/js/controls/VRControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ THREE.VRControls = function ( object, onError ) {
// standing=true but the VRDisplay doesn't provide stageParameters.
this.userHeight = 1.6;

this.getVRDisplay = function () {

return vrInput;

};

this.getStandingMatrix = function () {

return standingMatrix;
Expand Down
6 changes: 6 additions & 0 deletions examples/js/effects/VREffect.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ THREE.VREffect = function ( renderer, onError ) {
var rendererSize = renderer.getSize();
var rendererPixelRatio = renderer.getPixelRatio();

this.getVRDisplay = function () {

return vrHMD;

};

this.setSize = function ( width, height ) {

rendererSize = { width: width, height: height };
Expand Down

0 comments on commit c1c8b4a

Please sign in to comment.