Bläddra i källkod

Updated builds.

Mr.doob 9 år sedan
förälder
incheckning
ddb3c5201b
2 ändrade filer med 3 tillägg och 1 borttagningar
  1. 2 0
      build/three.js
  2. 1 1
      build/three.min.js

+ 2 - 0
build/three.js

@@ -17175,9 +17175,11 @@ THREE.StereoCamera = function ( fov, aspect, near, far ) {
 	this.focalLength = 125;
 
 	this.cameraL = new THREE.PerspectiveCamera();
+	this.cameraL.layers.enable( 1 );
 	this.cameraL.matrixAutoUpdate = false;
 
 	this.cameraR = new THREE.PerspectiveCamera();
+	this.cameraR.layers.enable( 2 );
 	this.cameraR.matrixAutoUpdate = false;
 
 };

+ 1 - 1
build/three.min.js

@@ -355,7 +355,7 @@ THREE.OrthographicCamera.prototype.toJSON=function(a){a=THREE.Object3D.prototype
 THREE.PerspectiveCamera.prototype=Object.create(THREE.Camera.prototype);THREE.PerspectiveCamera.prototype.constructor=THREE.PerspectiveCamera;THREE.PerspectiveCamera.prototype.setLens=function(a,b){void 0===b&&(b=24);this.fov=2*THREE.Math.radToDeg(Math.atan(b/(2*a)));this.updateProjectionMatrix()};THREE.PerspectiveCamera.prototype.setViewOffset=function(a,b,c,d,e,f){this.fullWidth=a;this.fullHeight=b;this.x=c;this.y=d;this.width=e;this.height=f;this.updateProjectionMatrix()};
 THREE.PerspectiveCamera.prototype.updateProjectionMatrix=function(){var a=THREE.Math.radToDeg(2*Math.atan(Math.tan(.5*THREE.Math.degToRad(this.fov))/this.zoom));if(this.fullWidth){var b=this.fullWidth/this.fullHeight,a=Math.tan(THREE.Math.degToRad(.5*a))*this.near,c=-a,d=b*c,b=Math.abs(b*a-d),c=Math.abs(a-c);this.projectionMatrix.makeFrustum(d+this.x*b/this.fullWidth,d+(this.x+this.width)*b/this.fullWidth,a-(this.y+this.height)*c/this.fullHeight,a-this.y*c/this.fullHeight,this.near,this.far)}else this.projectionMatrix.makePerspective(a,
 this.aspect,this.near,this.far)};THREE.PerspectiveCamera.prototype.copy=function(a){THREE.Camera.prototype.copy.call(this,a);this.fov=a.fov;this.aspect=a.aspect;this.near=a.near;this.far=a.far;this.zoom=a.zoom;return this};THREE.PerspectiveCamera.prototype.toJSON=function(a){a=THREE.Object3D.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.fov=this.fov;a.object.aspect=this.aspect;a.object.near=this.near;a.object.far=this.far;return a};
-THREE.StereoCamera=function(a,b,c,d){THREE.PerspectiveCamera.call(this,a,b,c,d);this.type="StereoCamera";this.focalLength=125;this.cameraL=new THREE.PerspectiveCamera;this.cameraL.matrixAutoUpdate=!1;this.cameraR=new THREE.PerspectiveCamera;this.cameraR.matrixAutoUpdate=!1};THREE.StereoCamera.prototype=Object.create(THREE.PerspectiveCamera.prototype);THREE.StereoCamera.prototype.constructor=THREE.StereoCamera;
+THREE.StereoCamera=function(a,b,c,d){THREE.PerspectiveCamera.call(this,a,b,c,d);this.type="StereoCamera";this.focalLength=125;this.cameraL=new THREE.PerspectiveCamera;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new THREE.PerspectiveCamera;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1};THREE.StereoCamera.prototype=Object.create(THREE.PerspectiveCamera.prototype);THREE.StereoCamera.prototype.constructor=THREE.StereoCamera;
 THREE.StereoCamera.prototype.updateMatrixWorld=function(){var a,b,c,d,e,f=new THREE.Matrix4,g=new THREE.Matrix4;return function(h){THREE.Object3D.prototype.updateMatrixWorld.call(this,h);if(a!==this.focalLength||b!==this.fov||c!==this.aspect||d!==this.near||e!==this.far){a=this.focalLength;b=this.fov;c=this.aspect;d=this.near;e=this.far;h=this.projectionMatrix.clone();var k=a/30*.5,l=k*d/a,m=d*Math.tan(THREE.Math.degToRad(.5*b)),p;g.elements[12]=-k;f.elements[12]=k;k=-m*c+l;p=m*c+l;h.elements[0]=
 2*d/(p-k);h.elements[8]=(p+k)/(p-k);this.cameraL.projectionMatrix.copy(h);k=-m*c-l;p=m*c-l;h.elements[0]=2*d/(p-k);h.elements[8]=(p+k)/(p-k);this.cameraR.projectionMatrix.copy(h)}this.cameraL.matrixWorld.copy(this.matrixWorld).multiply(g);this.cameraR.matrixWorld.copy(this.matrixWorld).multiply(f)}}();THREE.Light=function(a,b){THREE.Object3D.call(this);this.type="Light";this.color=new THREE.Color(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0};THREE.Light.prototype=Object.create(THREE.Object3D.prototype);
 THREE.Light.prototype.constructor=THREE.Light;THREE.Light.prototype.copy=function(a){THREE.Object3D.prototype.copy.call(this,a);this.color.copy(a.color);this.intensity=a.intensity;return this};