瀏覽代碼

fixed base64 image parse bug

Lewy Blue 7 年之前
父節點
當前提交
67423a8139
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      examples/js/loaders/FBXLoader.js

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

@@ -261,6 +261,12 @@
 
 		if ( typeof content === 'string' ) {
 
+			if ( content.slice( - 1 ) !== '=' ) {
+
+				content = content.slice( 0, - 1 );
+
+			}
+
 			return 'data:' + type + ';base64,' + content;
 
 		} else {