Browse Source

FBXLoader better fix for ASCII base64 image parsing error

Lewy Blue 7 years ago
parent
commit
7ef6c40766
1 changed files with 1 additions and 9 deletions
  1. 1 9
      examples/js/loaders/FBXLoader.js

+ 1 - 9
examples/js/loaders/FBXLoader.js

@@ -262,14 +262,6 @@
 
 
 		if ( typeof content === 'string' ) {
 		if ( typeof content === 'string' ) {
 
 
-			// ASCII format sometimes an extra ',' gets added to the end of the content string
-			// TODO: Investigate why the parser is adding this character
-			if ( content.slice( - 1 ) === ',' ) {
-
-				content = content.slice( 0, - 1 );
-
-			}
-
 			return 'data:' + type + ';base64,' + content;
 			return 'data:' + type + ';base64,' + content;
 
 
 		} else {
 		} else {
@@ -4144,7 +4136,7 @@
 					//	 "iVB..."
 					//	 "iVB..."
 					if ( propName === 'Content' && propValue === ',' ) {
 					if ( propName === 'Content' && propValue === ',' ) {
 
 
-						propValue = split[ ++ lineNum ].replace( /"/g, '' ).trim();
+            propValue = split[ ++ lineNum ].replace( /"/g, '' ).replace( /,$/, '' ).trim();
 
 
 					}
 					}