diff --git a/editor/index.html b/editor/index.html
index 689cece86f086ef866f3f287cb0f6b20023688ab..840de1071e22de43c6facbffdf7ca023b9fa55d6 100644
--- a/editor/index.html
+++ b/editor/index.html
@@ -39,7 +39,7 @@
.menubar .menu .options {
padding: 5px 0px;
background-color: #fff;
- width: 170px;
+ width: 140px;
}
.menubar .menu .options hr {
diff --git a/editor/js/Menubar.File.js b/editor/js/Menubar.File.js
index 7c03c4180a6d76565c19a90a1b18614479c59e95..ad908d1bf329633d7c070d9b41b6ea1b04013d6a 100644
--- a/editor/js/Menubar.File.js
+++ b/editor/js/Menubar.File.js
@@ -67,27 +67,24 @@ Menubar.File = function ( editor ) {
options.add( new UI.HorizontalRule() );
- // export buffergeometry
+ // export geometry
var option = new UI.Panel();
option.setClass( 'option' );
- option.setTextContent( 'Export BufferGeometry' );
+ option.setTextContent( 'Export Geometry' );
option.onClick( function () {
- exportGeometry( THREE.BufferGeometryExporter );
+ var geometry = editor.selected.geometry;
- } );
- options.add( option );
+ if ( geometry instanceof THREE.BufferGeometry ) {
+ exportGeometry( THREE.BufferGeometryExporter );
- // export geometry
+ } else if ( geometry instanceof THREE.Geometry ) {
- var option = new UI.Panel();
- option.setClass( 'option' );
- option.setTextContent( 'Export Geometry' );
- option.onClick( function () {
+ exportGeometry( THREE.GeometryExporter );
- exportGeometry( THREE.GeometryExporter );
+ }
} );
options.add( option );