Skip to content

Commit

Permalink
to fs (#28221)
Browse files Browse the repository at this point in the history
  • Loading branch information
ycw committed May 13, 2024
1 parent c52eebb commit cb1464c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
6 changes: 1 addition & 5 deletions editor/js/Sidebar.Geometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
6 changes: 1 addition & 5 deletions editor/js/Sidebar.Material.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
5 changes: 1 addition & 4 deletions editor/js/Sidebar.Object.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit cb1464c

Please sign in to comment.