|
@@ -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 );
|