Browse Source

Update Geometry.js

gero3 11 years ago
parent
commit
4eaa98320b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/core/Geometry.js

+ 2 - 2
src/core/Geometry.js

@@ -570,7 +570,7 @@ THREE.Geometry.prototype = {
 
 
 		var geometryGroupCounter = 0;
 		var geometryGroupCounter = 0;
 		
 		
-		return function ( usesFaceMaterial ) {
+		return function ( usesFaceMaterial, maxVerticesInGroup ) {
 
 
 			var f, fl, face, materialIndex,
 			var f, fl, face, materialIndex,
 				groupHash, hash_map = {};
 				groupHash, hash_map = {};
@@ -599,7 +599,7 @@ THREE.Geometry.prototype = {
 
 
 				}
 				}
 
 
-				if ( this.geometryGroups[ groupHash ].vertices + 3 > 65535 ) {
+				if ( this.geometryGroups[ groupHash ].vertices + 3 > maxVerticesInGroup ) {
 
 
 					hash_map[ materialIndex ].counter += 1;
 					hash_map[ materialIndex ].counter += 1;
 					groupHash = hash_map[ materialIndex ].hash + '_' + hash_map[ materialIndex ].counter;
 					groupHash = hash_map[ materialIndex ].hash + '_' + hash_map[ materialIndex ].counter;