|
@@ -1594,7 +1594,7 @@ THREE.GLTF2Loader = ( function () {
|
|
|
|
|
|
var attributeEntry = attributes[ attributeId ];
|
|
|
|
|
|
- if ( ! attributeEntry ) return;
|
|
|
+ if ( attributeEntry === undefined ) return;
|
|
|
|
|
|
var bufferAttribute = dependencies.accessors[ attributeEntry ];
|
|
|
|
|
@@ -1923,11 +1923,25 @@ THREE.GLTF2Loader = ( function () {
|
|
|
|
|
|
var node = json.nodes[ nodeId ];
|
|
|
|
|
|
- if ( node.meshes !== undefined ) {
|
|
|
+ var meshes;
|
|
|
+
|
|
|
+ if ( node.mesh !== undefined) {
|
|
|
+
|
|
|
+ meshes = [ node.mesh ];
|
|
|
+
|
|
|
+ } else if ( node.meshes !== undefined ) {
|
|
|
+
|
|
|
+ console.warn( 'GLTF2Loader: Legacy glTF file detected. Nodes may have no more than 1 mesh.' );
|
|
|
+
|
|
|
+ meshes = node.meshes;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if ( meshes !== undefined ) {
|
|
|
|
|
|
- for ( var meshId in node.meshes ) {
|
|
|
+ for ( var meshId in meshes ) {
|
|
|
|
|
|
- var mesh = node.meshes[ meshId ];
|
|
|
+ var mesh = meshes[ meshId ];
|
|
|
var group = dependencies.meshes[ mesh ];
|
|
|
|
|
|
if ( group === undefined ) {
|