Przeglądaj źródła

clone node associations in GLTFLoader (#31051)

nkrajina 8 miesięcy temu
rodzic
commit
7896d65833
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      examples/jsm/loaders/GLTFLoader.js

+ 5 - 0
examples/jsm/loaders/GLTFLoader.js

@@ -4451,6 +4451,11 @@ class GLTFParser {
 
 				parser.associations.set( node, {} );
 
+			} else if ( nodeDef.mesh !== undefined && parser.meshCache.refs[ nodeDef.mesh ] > 1 ) {
+
+				const mapping = parser.associations.get( node );
+				parser.associations.set( node, { ...mapping } );
+
 			}
 
 			parser.associations.get( node ).nodes = nodeIndex;

粤ICP备19079148号