Skip to content

Commit 3bfe7ec

Browse files
committed
GLTFLoader: assign unique names to children of cloned refs in _getNodeRef() (fixes mrdoob#30090)
1 parent d9bf05e commit 3bfe7ec

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

examples/jsm/loaders/GLTFLoader.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -2796,7 +2796,15 @@ class GLTFParser {
27962796

27972797
updateMappings( object, ref );
27982798

2799-
ref.name += '_instance_' + ( cache.uses[ index ] ++ );
2799+
const instanceSuffix = '_instance_' + ( cache.uses[ index ] ++ );
2800+
2801+
ref.name += instanceSuffix;
2802+
2803+
for ( const child of ref.children ) {
2804+
2805+
child.name += instanceSuffix;
2806+
2807+
}
28002808

28012809
return ref;
28022810

0 commit comments

Comments
 (0)