Browse Source

decodeText update

Remus M 7 years ago
parent
commit
322f1c8080
1 changed files with 1 additions and 9 deletions
  1. 1 9
      examples/js/loaders/sea3d/SEA3D.js

+ 1 - 9
examples/js/loaders/sea3d/SEA3D.js

@@ -285,15 +285,7 @@ SEA3D.Stream.prototype.readUTF8 = function ( len ) {
 
 	var buffer = this.readBytes( len );
 
-	if ( window.TextDecoder ) {
-
-		return new TextDecoder().decode( buffer );
-
-	} else {
-
-		return decodeURIComponent( escape( String.fromCharCode.apply( null, new Uint8Array( buffer ) ) ) );
-
-	}
+	return THREE.LoaderUtils.decodeText( new Uint8Array( buffer ) );
 
 };