|
@@ -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 ) );
|
|
|
|
|
|
};
|
|
|
|