diff --git a/editor/js/Menubar.File.js b/editor/js/Menubar.File.js index 6b230d3d22864bbe69e24e222ee5c49cc2b7fc4b..de004ebb4cc6b4a36c9da63b2b024323ee7cdc97 100644 --- a/editor/js/Menubar.File.js +++ b/editor/js/Menubar.File.js @@ -172,49 +172,52 @@ Menubar.File = function ( editor ) { } ); options.add( option ); - // Export OBJ + // + + options.add( new UI.HorizontalRule() ); + + // Export GLTF var option = new UI.Row(); option.setClass( 'option' ); - option.setTextContent( 'Export OBJ' ); + option.setTextContent( 'Export GLTF' ); option.onClick( function () { - var object = editor.selected; + var exporter = new THREE.GLTFExporter(); - if ( object === null ) { + exporter.parse( editor.scene, function ( result ) { - alert( 'No object selected.' ); - return; + saveString( JSON.stringify( result, null, 2 ), 'scene.gltf' ); - } + } ); - var exporter = new THREE.OBJExporter(); - - saveString( exporter.parse( object ), 'model.obj' ); } ); options.add( option ); - // Export GLTF + // Export OBJ var option = new UI.Row(); option.setClass( 'option' ); - option.setTextContent( 'Export GLTF2' ); + option.setTextContent( 'Export OBJ' ); option.onClick( function () { - var exporter = new THREE.GLTFExporter(); + var object = editor.selected; - exporter.parse( editor.scene, function ( result ) { + if ( object === null ) { - saveString( JSON.stringify( result, null, 2 ), 'scene.gltf' ); + alert( 'No object selected.' ); + return; - } ); + } + var exporter = new THREE.OBJExporter(); + + saveString( exporter.parse( object ), 'model.obj' ); } ); options.add( option ); - // Export STL var option = new UI.Row(); diff --git a/examples/files.js b/examples/files.js index 8dfc643b6344ba405ded45265c8e5cefffaa08a7..8e559d8b11a3240e337e90355a9cf4ef7608b9d4 100644 --- a/examples/files.js +++ b/examples/files.js @@ -18,8 +18,8 @@ var files = { "webgl_effects_parallaxbarrier", "webgl_effects_peppersghost", "webgl_effects_stereo", - "webgl_exporter_obj", "webgl_exporter_gltf2", + "webgl_exporter_obj", "webgl_geometries", "webgl_geometries2", "webgl_geometry_colors", @@ -148,7 +148,6 @@ var files = { "webgl_materials_envmaps_hdr", "webgl_materials_grass", "webgl_materials_lightmap", - "webgl_materials_modified", "webgl_materials_nodes", "webgl_materials_normalmap", "webgl_materials_parallaxmap", @@ -279,6 +278,7 @@ var files = { "webgl_custom_attributes_points", "webgl_custom_attributes_points2", "webgl_custom_attributes_points3", + "webgl_materials_modified", "webgl_raymarching_reflect" ], "webgl deferred": [