Browse Source

Merge remote-tracking branch 'remotes/mrdoob/dev' into dev

alteredq 13 years ago
parent
commit
af7a23116a

+ 1 - 6
src/extras/geometries/IcosahedronGeometry.js

@@ -1,9 +1,5 @@
 /**
  * @author oosmoxiecode
-
- * uvs are messed up in this one, and commented away for now. There is an ugly "seam" by the shared vertices
- * when it "wraps" around, that needs to be fixed. It´s because they share the first and the last vertices
- * so it draws the entire texture on the seam-faces, I think...
  */
 
 THREE.IcosahedronGeometry = function ( subdivisions ) {
@@ -13,8 +9,6 @@ THREE.IcosahedronGeometry = function ( subdivisions ) {
 	var tempFaces;
 	this.subdivisions = subdivisions || 0;
 
-	//var temp_uv = [];
-
 	THREE.Geometry.call(this);
 
 	// create 12 vertices of a Icosahedron
@@ -84,6 +78,7 @@ THREE.IcosahedronGeometry = function ( subdivisions ) {
 	scope.faces = tempScope.faces;
 	scope.faceVertexUvs[ 0 ] = tempScope.faceVertexUvs[ 0 ];
 
+	this.mergeVertices();
 	this.computeCentroids();
 	this.computeFaceNormals();
 

+ 1 - 1
src/extras/loaders/BinaryLoader.js

@@ -92,7 +92,7 @@ THREE.BinaryLoader.prototype.loadAjaxJSON = function( context, url, callback, te
 	};
 
 	xhr.open( "GET", url, true );
-	xhr.overrideMimeType( "text/plain; charset=x-user-defined" );
+	if ( xhr.overrideMimeType ) xhr.overrideMimeType( "text/plain; charset=x-user-defined" );
 	xhr.setRequestHeader( "Content-Type", "text/plain" );
 	xhr.send( null );
 

+ 1 - 7
src/extras/loaders/ColladaLoader.js

@@ -57,13 +57,7 @@ THREE.ColladaLoader = function () {
 
 			var req = new XMLHttpRequest();
 
-			if( req.overrideMimeType ) {
-
-				// need this? yes... if extension is other then *.xml :-S
-
-				req.overrideMimeType( "text/xml" );
-
-			}
+			if ( req.overrideMimeType ) req.overrideMimeType( "text/xml" );
 
 			req.onreadystatechange = function() {
 

+ 1 - 1
src/extras/loaders/JSONLoader.js

@@ -90,7 +90,7 @@ THREE.JSONLoader.prototype.loadAjaxJSON = function( context, url, callback, text
 	};
 
 	xhr.open( "GET", url, true );
-	xhr.overrideMimeType( "text/plain; charset=x-user-defined" );
+	if ( xhr.overrideMimeType ) xhr.overrideMimeType( "text/plain; charset=x-user-defined" );
 	xhr.setRequestHeader( "Content-Type", "text/plain" );
 	xhr.send( null );
 

+ 1 - 1
src/extras/loaders/SceneLoader.js

@@ -58,7 +58,7 @@ THREE.SceneLoader.prototype.load = function( url, callbackFinished ) {
 	};
 
 	xhr.open( "GET", url, true );
-	xhr.overrideMimeType( "text/plain; charset=x-user-defined" );
+	if ( xhr.overrideMimeType ) xhr.overrideMimeType( "text/plain; charset=x-user-defined" );
 	xhr.setRequestHeader( "Content-Type", "text/plain" );
 	xhr.send( null );