Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove THREE references from WebVRManager and add required imports #11548

Merged
merged 2 commits into from
Jun 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions src/renderers/webvr/WebVRManager.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/**
* @author mrdoob / http://mrdoob.com/
*/
import { Matrix4 } from '../../math/Matrix4';
import { Vector4 } from '../../math/Vector4';
import { ArrayCamera } from '../../cameras/ArrayCamera';
import { PerspectiveCamera } from '../../cameras/PerspectiveCamera';

function WebVRManager( renderer ) {

Expand All @@ -15,20 +19,20 @@ function WebVRManager( renderer ) {

}

var matrixWorldInverse = new THREE.Matrix4();
var matrixWorldInverse = new Matrix4();

var standingMatrix = new THREE.Matrix4();
var standingMatrixInverse = new THREE.Matrix4();
var standingMatrix = new Matrix4();
var standingMatrixInverse = new Matrix4();

var cameraL = new THREE.PerspectiveCamera();
cameraL.bounds = new THREE.Vector4( 0.0, 0.0, 0.5, 1.0 );
var cameraL = new PerspectiveCamera();
cameraL.bounds = new Vector4( 0.0, 0.0, 0.5, 1.0 );
cameraL.layers.enable( 1 );

var cameraR = new THREE.PerspectiveCamera();
cameraR.bounds = new THREE.Vector4( 0.5, 0.0, 0.5, 1.0 );
var cameraR = new PerspectiveCamera();
cameraR.bounds = new Vector4( 0.5, 0.0, 0.5, 1.0 );
cameraR.layers.enable( 2 );

var cameraVR = new THREE.ArrayCamera( [ cameraL, cameraR ] );
var cameraVR = new ArrayCamera( [ cameraL, cameraR ] );

//

Expand Down