| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- Menubar.File = function ( signals ) {
- var container = new UI.Panel();
- container.setClass( 'menu' );
- var title = new UI.Panel();
- title.setTextContent( 'File' ).setColor( '#666' );
- title.setMargin( '0px' );
- title.setPadding( '8px' );
- container.add( title );
- //
- var options = new UI.Panel();
- options.setClass( 'options' );
- container.add( options );
- /*
- // open
- var option = new UI.Panel();
- option.setClass( 'option' );
- option.setTextContent( 'Open' );
- option.onClick( function () { alert( 'Open' ) } );
- options.add( option );
- */
- // reset
- var option = new UI.Panel();
- option.setClass( 'option' );
- option.setTextContent( 'Reset' );
- option.onClick( function () {
- if ( confirm( 'Are you sure?' ) ) {
- if ( localStorage.threejsEditor !== undefined ) {
- delete localStorage.threejsEditor;
- }
- location.reload();
- }
- } );
- options.add( option );
- // export geometry
- var option = new UI.Panel();
- option.setClass( 'option' );
- option.setTextContent( 'Export Geometry' );
- option.onClick( function () { signals.exportGeometry.dispatch( { exporter: THREE.GeometryExporter } ); } );
- options.add( option );
- // export scene
- var option = new UI.Panel();
- option.setClass( 'option' );
- option.setTextContent( 'Export Scene' );
- option.onClick( function () { signals.exportScene.dispatch( { exporter: THREE.SceneExporter } ); } );
- options.add( option );
- // export scene 2
- var option = new UI.Panel();
- option.setClass( 'option' );
- option.setTextContent( 'Export Scene 2' );
- option.onClick( function () { signals.exportScene.dispatch( { exporter: THREE.SceneExporter2 } ); } );
- options.add( option );
- // export OBJ
- var option = new UI.Panel();
- option.setClass( 'option' );
- option.setTextContent( 'Export OBJ' );
- option.onClick( function () { signals.exportGeometry.dispatch( { exporter: THREE.OBJExporter } ); } );
- options.add( option );
- //
- return container;
- }
|