Skip to content

Commit 76b20a3

Browse files
nkrajinaRuthySheffi
authored andcommitted
clone node associations in GLTFLoader (mrdoob#31051)
1 parent e7329b5 commit 76b20a3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/jsm/loaders/GLTFLoader.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4451,6 +4451,11 @@ class GLTFParser {
44514451

44524452
parser.associations.set( node, {} );
44534453

4454+
} else if ( nodeDef.mesh !== undefined && parser.meshCache.refs[ nodeDef.mesh ] > 1 ) {
4455+
4456+
const mapping = parser.associations.get( node );
4457+
parser.associations.set( node, { ...mapping } );
4458+
44544459
}
44554460

44564461
parser.associations.get( node ).nodes = nodeIndex;

0 commit comments

Comments
 (0)