Explorar o código

Merge pull request #12929 from looeee/FBXLoader_fix_binaryparser_getstring

FBXLoader: allow BinaryParser.getString to use new LoaderUtils.decodeText method
Mr.doob %!s(int64=7) %!d(string=hai) anos
pai
achega
1f4836bc05
Modificáronse 1 ficheiros con 7 adicións e 3 borrados
  1. 7 3
      examples/js/loaders/FBXLoader.js

+ 7 - 3
examples/js/loaders/FBXLoader.js

@@ -3650,11 +3650,15 @@
 
 		getString: function ( size ) {
 
-			var s = THREE.LoaderUtils.decodeText( this.getUint8Array( size ) );
+			var a = new Uint8Array( this.getUint8Array( size ) );
 
-			this.skip( size );
+			// for ( var i = 0; i < size; i ++ ) {
 
-			return s;
+			// 	a[ i ] = this.getUint8();
+
+			// }
+
+			return THREE.LoaderUtils.decodeText( a );
 
 		}