Browse Source

GeometryExporter tweaks.

Mr.doob 12 years ago
parent
commit
487ba2c526
1 changed files with 3 additions and 2 deletions
  1. 3 2
      examples/js/exporters/GeometryExporter.js

+ 3 - 2
examples/js/exporters/GeometryExporter.js

@@ -32,6 +32,7 @@ THREE.GeometryExporter.prototype = {
 		var normalsHash = {};
 		var normalsHash = {};
 		var colors = [];
 		var colors = [];
 		var colorsHash = {};
 		var colorsHash = {};
+		var uvs = [];
 
 
 		for ( var i = 0; i < geometry.faces.length; i ++ ) {
 		for ( var i = 0; i < geometry.faces.length; i ++ ) {
 
 
@@ -217,8 +218,8 @@ THREE.GeometryExporter.prototype = {
 
 
 		output.vertices = vertices;
 		output.vertices = vertices;
 		output.normals = normals;
 		output.normals = normals;
-		output.colors = colors;
-		// output.uvs = uvs;
+		if ( colors.length > 0 ) output.colors = colors;
+		if ( uvs.length > 0 ) output.uvs = uvs;
 		output.faces = faces;
 		output.faces = faces;
 
 
 		//
 		//