瀏覽代碼

Cleaner code

* Object.assign modifies its first argument
* Conform to threejs' styleguide
Kalacione 6 年之前
父節點
當前提交
31fdc56b43
共有 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' ) {
 			if ( typeof gltfDef.extras === 'object' ) {
 
 
-				object.userData = Object.assign(object.userData, gltfDef.extras);
+				Object.assign( object.userData, gltfDef.extras );
 
 
 			} else {
 			} else {