소스 검색

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' );
+
 			}
 
 		} );