diff --git a/examples/js/exporters/GLTFExporter.js b/examples/js/exporters/GLTFExporter.js index d8d9eb3a2bca1afba951cc2bf6604d4ba8cde764..4be2647fd6615b9b7a6a99f124427393db7fdd1f 100644 --- a/examples/js/exporters/GLTFExporter.js +++ b/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 ); }