Skip to content

Commit

Permalink
Code transforming mrdoob style second attempt See mrdoob#4806
Browse files Browse the repository at this point in the history
  • Loading branch information
zz85 committed May 31, 2014
1 parent ad32620 commit aafd29c
Show file tree
Hide file tree
Showing 93 changed files with 1,184 additions and 1,184 deletions.
2 changes: 1 addition & 1 deletion src/cameras/Camera.js
Expand Up @@ -31,7 +31,7 @@ THREE.Camera.prototype.lookAt = function () {

}();

THREE.Camera.prototype.clone = function (camera) {
THREE.Camera.prototype.clone = function ( camera ) {

if ( camera === undefined ) camera = new THREE.Camera();

Expand Down
16 changes: 8 additions & 8 deletions src/cameras/CubeCamera.js
Expand Up @@ -12,13 +12,13 @@ THREE.CubeCamera = function ( near, far, cubeResolution ) {
var fov = 90, aspect = 1;

var cameraPX = new THREE.PerspectiveCamera( fov, aspect, near, far );
cameraPX.up.set( 0, -1, 0 );
cameraPX.up.set( 0, - 1, 0 );
cameraPX.lookAt( new THREE.Vector3( 1, 0, 0 ) );
this.add( cameraPX );

var cameraNX = new THREE.PerspectiveCamera( fov, aspect, near, far );
cameraNX.up.set( 0, -1, 0 );
cameraNX.lookAt( new THREE.Vector3( -1, 0, 0 ) );
cameraNX.up.set( 0, - 1, 0 );
cameraNX.lookAt( new THREE.Vector3( - 1, 0, 0 ) );
this.add( cameraNX );

var cameraPY = new THREE.PerspectiveCamera( fov, aspect, near, far );
Expand All @@ -27,18 +27,18 @@ THREE.CubeCamera = function ( near, far, cubeResolution ) {
this.add( cameraPY );

var cameraNY = new THREE.PerspectiveCamera( fov, aspect, near, far );
cameraNY.up.set( 0, 0, -1 );
cameraNY.lookAt( new THREE.Vector3( 0, -1, 0 ) );
cameraNY.up.set( 0, 0, - 1 );
cameraNY.lookAt( new THREE.Vector3( 0, - 1, 0 ) );
this.add( cameraNY );

var cameraPZ = new THREE.PerspectiveCamera( fov, aspect, near, far );
cameraPZ.up.set( 0, -1, 0 );
cameraPZ.up.set( 0, - 1, 0 );
cameraPZ.lookAt( new THREE.Vector3( 0, 0, 1 ) );
this.add( cameraPZ );

var cameraNZ = new THREE.PerspectiveCamera( fov, aspect, near, far );
cameraNZ.up.set( 0, -1, 0 );
cameraNZ.lookAt( new THREE.Vector3( 0, 0, -1 ) );
cameraNZ.up.set( 0, - 1, 0 );
cameraNZ.lookAt( new THREE.Vector3( 0, 0, - 1 ) );
this.add( cameraNZ );

this.renderTarget = new THREE.WebGLRenderTargetCube( cubeResolution, cubeResolution, { format: THREE.RGBFormat, magFilter: THREE.LinearFilter, minFilter: THREE.LinearFilter } );
Expand Down
2 changes: 1 addition & 1 deletion src/cameras/OrthographicCamera.js
Expand Up @@ -36,7 +36,7 @@ THREE.OrthographicCamera.prototype.clone = function () {
camera.right = this.right;
camera.top = this.top;
camera.bottom = this.bottom;

camera.near = this.near;
camera.far = this.far;

Expand Down
2 changes: 1 addition & 1 deletion src/cameras/PerspectiveCamera.js
Expand Up @@ -92,7 +92,7 @@ THREE.PerspectiveCamera.prototype.updateProjectionMatrix = function () {

var aspect = this.fullWidth / this.fullHeight;
var top = Math.tan( THREE.Math.degToRad( this.fov * 0.5 ) ) * this.near;
var bottom = -top;
var bottom = - top;
var left = aspect * bottom;
var right = aspect * top;
var width = Math.abs( right - left );
Expand Down

0 comments on commit aafd29c

Please sign in to comment.