Browse Source

GLTF*Loader: Produce THREE.Group instead of THREE.Object3D.

Mr.doob 8 years ago
parent
commit
18d8c13c29
2 changed files with 2 additions and 2 deletions
  1. 1 1
      examples/js/loaders/GLTF2Loader.js
  2. 1 1
      examples/js/loaders/GLTFLoader.js

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

@@ -1560,7 +1560,7 @@ THREE.GLTF2Loader = ( function () {
 
 			return _each( json.meshes, function ( mesh ) {
 
-				var group = new THREE.Object3D();
+				var group = new THREE.Group();
 				if ( mesh.name !== undefined ) group.name = mesh.name;
 
 				if ( mesh.extras ) group.userData = mesh.extras;

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

@@ -1584,7 +1584,7 @@ THREE.GLTFLoader = ( function () {
 
 			return _each( json.meshes, function ( mesh ) {
 
-				var group = new THREE.Object3D();
+				var group = new THREE.Group();
 				if ( mesh.name !== undefined ) group.name = mesh.name;
 
 				if ( mesh.extras ) group.userData = mesh.extras;