Browse Source

Updated builds.

Mr.doob 8 years ago
parent
commit
11f7e06db5
3 changed files with 300 additions and 243 deletions
  1. 28 0
      build/three.js
  2. 244 243
      build/three.min.js
  3. 28 0
      build/three.module.js

+ 28 - 0
build/three.js

@@ -19717,6 +19717,9 @@
 
 		var matrixWorldInverse = new THREE.Matrix4();
 
+		var standingMatrix = new THREE.Matrix4();
+		var standingMatrixInverse = new THREE.Matrix4();
+
 		var cameraL = new THREE.PerspectiveCamera();
 		cameraL.bounds = new THREE.Vector4( 0.0, 0.0, 0.5, 1.0 );
 		cameraL.layers.enable( 1 );
@@ -19759,6 +19762,7 @@
 		//
 
 		this.enabled = false;
+		this.standing = false;
 
 		this.getDevice = function () {
 
@@ -19803,6 +19807,17 @@
 
 			camera.updateMatrixWorld();
 
+			var stageParameters = device.stageParameters;
+
+			if ( this.standing && stageParameters ) {
+
+				standingMatrix.fromArray( stageParameters.sittingToStandingTransform );
+				standingMatrixInverse.getInverse( standingMatrix );
+
+				camera.matrixWorld.multiply( standingMatrix );
+
+			}
+
 			if ( device.isPresenting === false ) return camera;
 
 			//
@@ -19813,6 +19828,13 @@
 			cameraL.matrixWorldInverse.fromArray( frameData.leftViewMatrix );
 			cameraR.matrixWorldInverse.fromArray( frameData.rightViewMatrix );
 
+			if ( this.standing && stageParameters ) {
+
+				cameraL.matrixWorldInverse.multiply( standingMatrixInverse );
+				cameraR.matrixWorldInverse.multiply( standingMatrixInverse );
+
+			}
+
 			var parent = camera.parent;
 
 			if ( parent !== null ) {
@@ -19858,6 +19880,12 @@
 
 		};
 
+		this.getStandingMatrix = function () {
+
+			return standingMatrix;
+
+		};
+
 		this.submitFrame = function () {
 
 			if ( device && device.isPresenting ) device.submitFrame();

File diff suppressed because it is too large
+ 244 - 243
build/three.min.js


+ 28 - 0
build/three.module.js

@@ -19711,6 +19711,9 @@ function WebVRManager( renderer ) {
 
 	var matrixWorldInverse = new THREE.Matrix4();
 
+	var standingMatrix = new THREE.Matrix4();
+	var standingMatrixInverse = new THREE.Matrix4();
+
 	var cameraL = new THREE.PerspectiveCamera();
 	cameraL.bounds = new THREE.Vector4( 0.0, 0.0, 0.5, 1.0 );
 	cameraL.layers.enable( 1 );
@@ -19753,6 +19756,7 @@ function WebVRManager( renderer ) {
 	//
 
 	this.enabled = false;
+	this.standing = false;
 
 	this.getDevice = function () {
 
@@ -19797,6 +19801,17 @@ function WebVRManager( renderer ) {
 
 		camera.updateMatrixWorld();
 
+		var stageParameters = device.stageParameters;
+
+		if ( this.standing && stageParameters ) {
+
+			standingMatrix.fromArray( stageParameters.sittingToStandingTransform );
+			standingMatrixInverse.getInverse( standingMatrix );
+
+			camera.matrixWorld.multiply( standingMatrix );
+
+		}
+
 		if ( device.isPresenting === false ) return camera;
 
 		//
@@ -19807,6 +19822,13 @@ function WebVRManager( renderer ) {
 		cameraL.matrixWorldInverse.fromArray( frameData.leftViewMatrix );
 		cameraR.matrixWorldInverse.fromArray( frameData.rightViewMatrix );
 
+		if ( this.standing && stageParameters ) {
+
+			cameraL.matrixWorldInverse.multiply( standingMatrixInverse );
+			cameraR.matrixWorldInverse.multiply( standingMatrixInverse );
+
+		}
+
 		var parent = camera.parent;
 
 		if ( parent !== null ) {
@@ -19852,6 +19874,12 @@ function WebVRManager( renderer ) {
 
 	};
 
+	this.getStandingMatrix = function () {
+
+		return standingMatrix;
+
+	};
+
 	this.submitFrame = function () {
 
 		if ( device && device.isPresenting ) device.submitFrame();

Some files were not shown because too many files changed in this diff