Explorar o código

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

Michael Herzog hai 1 ano
pai
achega
a6a5d8b34c
Modificáronse 1 ficheiros con 0 adicións e 13 borrados
  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 ) {
 
-			if ( chunks === undefined || chunks === null ) {
-
-				chunks = 1;
-
-			}
-
 			let _chunkSize = 1;
 			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 _bytes;