浏览代码

decodeText update

Remus M 7 年之前
父节点
当前提交
322f1c8080
共有 1 个文件被更改,包括 1 次插入9 次删除
  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 );
 	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 ) );
 
 
 };
 };