Browse Source

Merge pull request #12318 from looeee/FBXLoader_base64_image_bug

FbxLoader base64 image parsing error
Mr.doob 7 years ago
parent
commit
a48399690b
1 changed files with 7 additions and 0 deletions
  1. 7 0
      examples/js/loaders/FBXLoader.js

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

@@ -261,6 +261,13 @@
 
 		if ( typeof content === 'string' ) {
 
+			// ASCII format sometimes adds an extra character to the end of the content string
+			if ( content.slice( - 1 ) !== '=' ) {
+
+				content = content.slice( 0, - 1 );
+
+			}
+
 			return 'data:' + type + ';base64,' + content;
 
 		} else {