Browse Source

BufferGeometry: Removed unused flags.

Mr.doob 11 years ago
parent
commit
5904ff0b19
1 changed files with 9 additions and 19 deletions
  1. 9 19
      src/core/BufferGeometry.js

+ 9 - 19
src/core/BufferGeometry.js

@@ -22,8 +22,6 @@ THREE.BufferGeometry = function () {
 	this.boundingBox = null;
 	this.boundingSphere = null;
 
-	this.hasTangents = false;
-
 };
 
 THREE.BufferGeometry.prototype = {
@@ -43,28 +41,23 @@ THREE.BufferGeometry.prototype = {
 
 	applyMatrix: function ( matrix ) {
 
-		var positionArray;
-		var normalArray;
-
-		if ( this.attributes[ "position" ] ) positionArray = this.attributes[ "position" ].array;
-		if ( this.attributes[ "normal" ] ) normalArray = this.attributes[ "normal" ].array;
+		var position = this.attributes.position;
 
-		if ( positionArray !== undefined ) {
+		if ( position !== undefined ) {
 
-			matrix.multiplyVector3Array( positionArray );
-			this.verticesNeedUpdate = true;
+			matrix.multiplyVector3Array( position.array );
+			position.needsUpdate = true;
 
 		}
 
-		if ( normalArray !== undefined ) {
-
-			var normalMatrix = new THREE.Matrix3().getNormalMatrix( matrix );
+		var normal = this.attributes.normal;
 
-			normalMatrix.multiplyVector3Array( normalArray );
+		if ( normal !== undefined ) {
 
-			this.normalizeNormals();
+			var normalMatrix = new THREE.Matrix3().getNormalMatrix( matrix );
 
-			this.normalsNeedUpdate = true;
+			normalMatrix.multiplyVector3Array( normal.array );
+			normal.needsUpdate = true;
 
 		}
 
@@ -553,9 +546,6 @@ THREE.BufferGeometry.prototype = {
 
 		}
 
-		this.hasTangents = true;
-		this.tangentsNeedUpdate = true;
-
 	},
 
 	/*