Browse Source

dont need camera in scene, can avoid a new

Richard Monette 7 years ago
parent
commit
ded66b2e34
1 changed files with 3 additions and 4 deletions
  1. 3 4
      examples/js/loaders/EquiangularToCubeGenerator.js

+ 3 - 4
examples/js/loaders/EquiangularToCubeGenerator.js

@@ -21,7 +21,6 @@ THREE.EquiangularToCubeGenerator = function( sourceTexture, resolution ) {
 	this.boxMesh.material.side = THREE.DoubleSide;
 	this.scene = new THREE.Scene();
 	this.scene.add( this.boxMesh );
-	this.scene.add( this.camera );
 
 };
 
@@ -49,9 +48,9 @@ THREE.EquiangularToCubeGenerator.prototype = {
 
 			var v = this.views[i];
 
-			this.camera.position.set(0, 0, 0);
-			this.camera.up.set(v.u[0], v.u[1], v.u[2]);
-			this.camera.lookAt(new THREE.Vector3(v.t[0], v.t[1], v.t[2]));
+			this.camera.position.set( 0, 0, 0 );
+			this.camera.up.set( v.u[ 0 ], v.u[ 1 ], v.u[ 2 ] );
+			this.camera.lookAt( v.t[ 0 ], v.t[ 1 ], v.t[ 2 ] );
 
 			this.camera.updateProjectionMatrix();