Skip to content

Commit 5e0bccd

Browse files
authored
Merge pull request #16412 from Kalacione/patch-1
GLTFLoader - store original node name
2 parents 288aa09 + 31fdc56 commit 5e0bccd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/js/loaders/GLTFLoader.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,7 @@ THREE.GLTFLoader = ( function () {
12991299

13001300
if ( typeof gltfDef.extras === 'object' ) {
13011301

1302-
object.userData = gltfDef.extras;
1302+
Object.assign( object.userData, gltfDef.extras );
13031303

13041304
} else {
13051305

@@ -2996,6 +2996,7 @@ THREE.GLTFLoader = ( function () {
29962996

29972997
if ( nodeDef.name !== undefined ) {
29982998

2999+
node.userData.name = nodeDef.name;
29993000
node.name = THREE.PropertyBinding.sanitizeNodeName( nodeDef.name );
30003001

30013002
}

0 commit comments

Comments
 (0)