Browse Source

Revert "GLTFExporter: Fix export of multi-material meshes."

This reverts commit aa3243fa11fee0087260102590f95a143b537be7.
Takahiro 6 years ago
parent
commit
6894f50e54
1 changed files with 2 additions and 4 deletions
  1. 2 4
      examples/js/exporters/GLTFExporter.js

+ 2 - 4
examples/js/exporters/GLTFExporter.js

@@ -1358,16 +1358,14 @@ THREE.GLTFExporter.prototype = {
 
 				if ( geometry.index !== null ) {
 
-					var cacheKey = geometry.uuid + ':' + groups[ i ].start + ':' + groups[ i ].count;
-
-					if ( cachedData.attributes.has( cacheKey ) ) {
+					if ( cachedData.attributes.has( geometry.index ) ) {
 
 						primitive.indices = cachedData.attributes.get( geometry.index );
 
 					} else {
 
 						primitive.indices = processAccessor( geometry.index, geometry, groups[ i ].start, groups[ i ].count );
-						cachedData.attributes.set( cacheKey, primitive.indices );
+						cachedData.attributes.set( geometry.index, primitive.indices );
 
 					}