Browse Source

Fix getString to use new LoaderUtils.decodeText method

Lewy Blue 7 years ago
parent
commit
1bb5c760a4
1 changed files with 7 additions and 3 deletions
  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( size );
 
-			this.skip( size );
+			for ( var i = 0; i < size; i ++ ) {
+
+				a[ i ] = this.getUint8();
+
+			}
 
-			return s;
+			return THREE.LoaderUtils.decodeText( a );
 
 		}