diff --git a/examples/js/exporters/GLTFExporter.js b/examples/js/exporters/GLTFExporter.js index 629e010d89c448..17afe590e94c84 100644 --- a/examples/js/exporters/GLTFExporter.js +++ b/examples/js/exporters/GLTFExporter.js @@ -117,6 +117,7 @@ THREE.GLTFExporter.prototype = { meshes: new Map(), attributes: new Map(), + attributesRelative: new Map(), attributesNormalized: new Map(), materials: new Map(), textures: new Map(), @@ -1250,9 +1251,9 @@ THREE.GLTFExporter.prototype = { var baseAttribute = geometry.attributes[ attributeName ]; - if ( cachedData.attributes.has( getUID( attribute ) ) ) { + if ( cachedData.attributesRelative.has( getUID( attribute ) ) ) { - target[ gltfAttributeName ] = cachedData.attributes.get( getUID( attribute ) ); + target[ gltfAttributeName ] = cachedData.attributesRelative.get( getUID( attribute ) ); continue; } @@ -1272,7 +1273,7 @@ THREE.GLTFExporter.prototype = { } target[ gltfAttributeName ] = processAccessor( relativeAttribute, geometry ); - cachedData.attributes.set( getUID( baseAttribute ), target[ gltfAttributeName ] ); + cachedData.attributesRelative.set( getUID( baseAttribute ), target[ gltfAttributeName ] ); } diff --git a/examples/js/loaders/GLTFLoader.js b/examples/js/loaders/GLTFLoader.js index c617c5609940a7..26bbf8910b9ecd 100644 --- a/examples/js/loaders/GLTFLoader.js +++ b/examples/js/loaders/GLTFLoader.js @@ -2810,8 +2810,6 @@ THREE.GLTFLoader = ( function () { } - var targetName = node.name ? node.name : node.uuid; - var interpolation = sampler.interpolation !== undefined ? INTERPOLATION[ sampler.interpolation ] : THREE.InterpolateLinear; var targetNames = []; @@ -2823,7 +2821,7 @@ THREE.GLTFLoader = ( function () { if ( object.isMesh === true && object.morphTargetInfluences ) { - targetNames.push( object.name ? object.name : object.uuid ); + targetNames.push( object.uuid ); } @@ -2831,7 +2829,7 @@ THREE.GLTFLoader = ( function () { } else { - targetNames.push( targetName ); + targetNames.push( node.uuid ); } diff --git a/examples/jsm/exporters/GLTFExporter.js b/examples/jsm/exporters/GLTFExporter.js index 669d0a82416b3e..f906aa7f528018 100644 --- a/examples/jsm/exporters/GLTFExporter.js +++ b/examples/jsm/exporters/GLTFExporter.js @@ -141,6 +141,7 @@ GLTFExporter.prototype = { meshes: new Map(), attributes: new Map(), + attributesRelative: new Map(), attributesNormalized: new Map(), materials: new Map(), textures: new Map(), @@ -1274,9 +1275,9 @@ GLTFExporter.prototype = { var baseAttribute = geometry.attributes[ attributeName ]; - if ( cachedData.attributes.has( getUID( attribute ) ) ) { + if ( cachedData.attributesRelative.has( getUID( attribute ) ) ) { - target[ gltfAttributeName ] = cachedData.attributes.get( getUID( attribute ) ); + target[ gltfAttributeName ] = cachedData.attributesRelative.get( getUID( attribute ) ); continue; } @@ -1296,7 +1297,7 @@ GLTFExporter.prototype = { } target[ gltfAttributeName ] = processAccessor( relativeAttribute, geometry ); - cachedData.attributes.set( getUID( baseAttribute ), target[ gltfAttributeName ] ); + cachedData.attributesRelative.set( getUID( baseAttribute ), target[ gltfAttributeName ] ); } diff --git a/examples/jsm/loaders/GLTFLoader.js b/examples/jsm/loaders/GLTFLoader.js index 29c4cfc394b330..6781446df3c620 100644 --- a/examples/jsm/loaders/GLTFLoader.js +++ b/examples/jsm/loaders/GLTFLoader.js @@ -2876,8 +2876,6 @@ var GLTFLoader = ( function () { } - var targetName = node.name ? node.name : node.uuid; - var interpolation = sampler.interpolation !== undefined ? INTERPOLATION[ sampler.interpolation ] : InterpolateLinear; var targetNames = []; @@ -2889,7 +2887,7 @@ var GLTFLoader = ( function () { if ( object.isMesh === true && object.morphTargetInfluences ) { - targetNames.push( object.name ? object.name : object.uuid ); + targetNames.push( object.uuid ); } @@ -2897,7 +2895,7 @@ var GLTFLoader = ( function () { } else { - targetNames.push( targetName ); + targetNames.push( node.uuid ); }