提交 13f2670d 编写于 作者: M Mr.doob

Minor tweaks.

上级 c2766298
...@@ -172,49 +172,52 @@ Menubar.File = function ( editor ) { ...@@ -172,49 +172,52 @@ Menubar.File = function ( editor ) {
} ); } );
options.add( option ); options.add( option );
// Export OBJ //
options.add( new UI.HorizontalRule() );
// Export GLTF
var option = new UI.Row(); var option = new UI.Row();
option.setClass( 'option' ); option.setClass( 'option' );
option.setTextContent( 'Export OBJ' ); option.setTextContent( 'Export GLTF' );
option.onClick( function () { 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.' ); saveString( JSON.stringify( result, null, 2 ), 'scene.gltf' );
return;
} } );
var exporter = new THREE.OBJExporter();
saveString( exporter.parse( object ), 'model.obj' );
} ); } );
options.add( option ); options.add( option );
// Export GLTF // Export OBJ
var option = new UI.Row(); var option = new UI.Row();
option.setClass( 'option' ); option.setClass( 'option' );
option.setTextContent( 'Export GLTF2' ); option.setTextContent( 'Export OBJ' );
option.onClick( function () { 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 ); options.add( option );
// Export STL // Export STL
var option = new UI.Row(); var option = new UI.Row();
......
...@@ -18,8 +18,8 @@ var files = { ...@@ -18,8 +18,8 @@ var files = {
"webgl_effects_parallaxbarrier", "webgl_effects_parallaxbarrier",
"webgl_effects_peppersghost", "webgl_effects_peppersghost",
"webgl_effects_stereo", "webgl_effects_stereo",
"webgl_exporter_obj",
"webgl_exporter_gltf2", "webgl_exporter_gltf2",
"webgl_exporter_obj",
"webgl_geometries", "webgl_geometries",
"webgl_geometries2", "webgl_geometries2",
"webgl_geometry_colors", "webgl_geometry_colors",
...@@ -148,7 +148,6 @@ var files = { ...@@ -148,7 +148,6 @@ var files = {
"webgl_materials_envmaps_hdr", "webgl_materials_envmaps_hdr",
"webgl_materials_grass", "webgl_materials_grass",
"webgl_materials_lightmap", "webgl_materials_lightmap",
"webgl_materials_modified",
"webgl_materials_nodes", "webgl_materials_nodes",
"webgl_materials_normalmap", "webgl_materials_normalmap",
"webgl_materials_parallaxmap", "webgl_materials_parallaxmap",
...@@ -279,6 +278,7 @@ var files = { ...@@ -279,6 +278,7 @@ var files = {
"webgl_custom_attributes_points", "webgl_custom_attributes_points",
"webgl_custom_attributes_points2", "webgl_custom_attributes_points2",
"webgl_custom_attributes_points3", "webgl_custom_attributes_points3",
"webgl_materials_modified",
"webgl_raymarching_reflect" "webgl_raymarching_reflect"
], ],
"webgl deferred": [ "webgl deferred": [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册