Преглед изворни кода

Support non-declared buffer.type

Takahiro пре 8 година
родитељ
комит
9020017a80
1 измењених фајлова са 5 додато и 1 уклоњено
  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' );
+
 			}
 
 		} );