浏览代码

NRRDLoader: Make sure `scan()` always returns a typed array. (#27212)

Michael Herzog 1 年之前
父节点
当前提交
a6a5d8b34c
共有 1 个文件被更改,包括 0 次插入13 次删除
  1. 0 13
      examples/jsm/loaders/NRRDLoader.js

+ 0 - 13
examples/jsm/loaders/NRRDLoader.js

@@ -76,12 +76,6 @@ class NRRDLoader extends Loader {
 
 
 		function scan( type, chunks ) {
 		function scan( type, chunks ) {
 
 
-			if ( chunks === undefined || chunks === null ) {
-
-				chunks = 1;
-
-			}
-
 			let _chunkSize = 1;
 			let _chunkSize = 1;
 			let _array_type = Uint8Array;
 			let _array_type = Uint8Array;
 
 
@@ -138,13 +132,6 @@ class NRRDLoader extends Loader {
 
 
 			}
 			}
 
 
-			if ( chunks == 1 ) {
-
-				// if only one chunk was requested, just return one value
-				return _bytes[ 0 ];
-
-			}
-
 			// return the byte array
 			// return the byte array
 			return _bytes;
 			return _bytes;