Mr.doob vor 8 Jahren
Ursprung
Commit
13f2670d10
2 geänderte Dateien mit 22 neuen und 19 gelöschten Zeilen
  1. 20 17
      editor/js/Menubar.File.js
  2. 2 2
      examples/files.js

+ 20 - 17
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();

+ 2 - 2
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": [