Browse Source

Merge pull request #12863 from takahirox/CleanupLoaderUtils

Clean up LoaderUtils
Mr.doob 7 years ago
parent
commit
5e2e7a9c0f
1 changed files with 19 additions and 19 deletions
  1. 19 19
      src/loaders/LoaderUtils.js

+ 19 - 19
src/loaders/LoaderUtils.js

@@ -1,40 +1,40 @@
 var LoaderUtils = {
 
-  decodeText: function ( array ) {
+	decodeText: function ( array ) {
 
-    if ( typeof TextDecoder !== 'undefined' ) {
+		if ( typeof TextDecoder !== 'undefined' ) {
 
-      return new TextDecoder().decode( array );
+			return new TextDecoder().decode( array );
 
-    }
+		}
 
-    // Avoid the String.fromCharCode.apply(null, array) shortcut, which
-    // throws a "maximum call stack size exceeded" error for large arrays.
+		// Avoid the String.fromCharCode.apply(null, array) shortcut, which
+		// throws a "maximum call stack size exceeded" error for large arrays.
 
-    var s = '';
+		var s = '';
 
-    for ( var i = 0, il = array.length; i < il; i ++ ) {
+		for ( var i = 0, il = array.length; i < il; i ++ ) {
 
-      // Implicitly assumes little-endian.
-      s += String.fromCharCode( array[ i ] );
+			// Implicitly assumes little-endian.
+			s += String.fromCharCode( array[ i ] );
 
-    }
+		}
 
-    return s;
+		return s;
 
-  },
+	},
 
-  extractUrlBase: function ( url ) {
+	extractUrlBase: function ( url ) {
 
-    var parts = url.split( '/' );
+		var parts = url.split( '/' );
 
-    if ( parts.length === 1 ) return './';
+		if ( parts.length === 1 ) return './';
 
-    parts.pop();
+		parts.pop();
 
-    return parts.join( '/' ) + '/';
+		return parts.join( '/' ) + '/';
 
-  }
+	}
 
 };