diff --git a/editor/js/Sidebar.Geometry.js b/editor/js/Sidebar.Geometry.js index ec437c29aaf0f2..22fd1e6bc1dfc3 100644 --- a/editor/js/Sidebar.Geometry.js +++ b/editor/js/Sidebar.Geometry.js @@ -192,11 +192,7 @@ function SidebarGeometry( editor ) { } - const left = ( screen.width - 500 ) / 2; - const top = ( screen.height - 500 ) / 2; - - 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` ); + editor.utils.save( new Blob( [ output ] ), `${ geometryName.getValue() || 'geometry' }.json` ); } ); container.add( exportJson ); diff --git a/editor/js/Sidebar.Material.js b/editor/js/Sidebar.Material.js index 9b868904bf3fbc..a5fd182200aa0a 100644 --- a/editor/js/Sidebar.Material.js +++ b/editor/js/Sidebar.Material.js @@ -445,11 +445,7 @@ function SidebarMaterial( editor ) { } - const left = ( screen.width - 500 ) / 2; - const top = ( screen.height - 500 ) / 2; - - 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` ); + editor.utils.save( new Blob( [ output ] ), `${ materialName.getValue() || 'material' }.json` ); } ); container.add( exportJson ); diff --git a/editor/js/Sidebar.Object.js b/editor/js/Sidebar.Object.js index d76dc50a995cba..3f1b3610e807e2 100644 --- a/editor/js/Sidebar.Object.js +++ b/editor/js/Sidebar.Object.js @@ -409,11 +409,8 @@ function SidebarObject( editor ) { } - const left = ( screen.width - 500 ) / 2; - const top = ( screen.height - 500 ) / 2; - 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` ); + editor.utils.save( new Blob( [ output ] ), `${ objectName.getValue() || 'object' }.json` ); } ); container.add( exportJson );