瀏覽代碼

Editor: Also add utf8 charset to object/material json export.

Mr.doob 1 年之前
父節點
當前提交
c96c6bd091
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      editor/js/Sidebar.Material.js
  2. 1 1
      editor/js/Sidebar.Object.js

+ 1 - 1
editor/js/Sidebar.Material.js

@@ -438,7 +438,7 @@ function SidebarMaterial( editor ) {
 		const left = ( screen.width - 500 ) / 2;
 		const left = ( screen.width - 500 ) / 2;
 		const top = ( screen.height - 500 ) / 2;
 		const top = ( screen.height - 500 ) / 2;
 
 
-		const url = URL.createObjectURL( new Blob( [ output ], { type: 'text/plain' } ) );
+		const url = URL.createObjectURL( new Blob( [ output ], { type: 'text/plain;charset=utf-8' } ) );
 		window.open( url, '_blank', `location=no,left=${left},top=${top},width=500,height=500` );
 		window.open( url, '_blank', `location=no,left=${left},top=${top},width=500,height=500` );
 
 
 	} );
 	} );

+ 1 - 1
editor/js/Sidebar.Object.js

@@ -412,7 +412,7 @@ function SidebarObject( editor ) {
 		const left = ( screen.width - 500 ) / 2;
 		const left = ( screen.width - 500 ) / 2;
 		const top = ( screen.height - 500 ) / 2;
 		const top = ( screen.height - 500 ) / 2;
 
 
-		const url = URL.createObjectURL( new Blob( [ output ], { type: 'text/plain' } ) );
+		const url = URL.createObjectURL( new Blob( [ output ], { type: 'text/plain;charset=utf-8' } ) );
 		window.open( url, '_blank', `location=no,left=${left},top=${top},width=500,height=500` );
 		window.open( url, '_blank', `location=no,left=${left},top=${top},width=500,height=500` );
 
 
 	} );
 	} );