Skip to content

Commit

Permalink
GLTFLoader: assign unique names to children of cloned refs in _getNod…
Browse files Browse the repository at this point in the history
…eRef() (fixes mrdoob#30090)
  • Loading branch information
Mirei3D committed Dec 10, 2024
1 parent d9bf05e commit 3bfe7ec
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion examples/jsm/loaders/GLTFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2796,7 +2796,15 @@ class GLTFParser {

updateMappings( object, ref );

ref.name += '_instance_' + ( cache.uses[ index ] ++ );
const instanceSuffix = '_instance_' + ( cache.uses[ index ] ++ );

ref.name += instanceSuffix;

for ( const child of ref.children ) {

child.name += instanceSuffix;

}

return ref;

Expand Down

0 comments on commit 3bfe7ec

Please sign in to comment.