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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Style Improvements 2 #4873

Merged
merged 1 commit into from May 31, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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