Browse Source

Support non-declared buffer.type

Takahiro 8 years ago
parent
commit
9020017a80
1 changed files with 5 additions and 1 deletions
  1. 5 1
      examples/js/loaders/GLTFLoader.js

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

@@ -694,7 +694,7 @@ THREE.GLTFLoader = ( function () {
 
 		return _each( json.buffers, function ( buffer ) {
 
-			if ( buffer.type === 'arraybuffer' ) {
+			if ( buffer.type === 'arraybuffer' || buffer.type === undefined ) {
 
 				return new Promise( function ( resolve ) {
 
@@ -708,6 +708,10 @@ THREE.GLTFLoader = ( function () {
 
 				} );
 
+			} else {
+
+				console.warn( 'THREE.GLTFLoader: ' + buffer.type + ' buffer type is not supported' );
+
 			}
 
 		} );