Просмотр исходного кода

Keep existing properties in object.userData

Kalacione 6 лет назад
Родитель
Сommit
d7a2400097
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      examples/js/loaders/GLTFLoader.js

+ 1 - 1
examples/js/loaders/GLTFLoader.js

@@ -1299,7 +1299,7 @@ THREE.GLTFLoader = ( function () {
 
 			if ( typeof gltfDef.extras === 'object' ) {
 
-				object.userData = gltfDef.extras;
+				object.userData = Object.assign(object.userData, gltfDef.extras);
 
 			} else {
 

粤ICP备19079148号