Export to 3MF Format

There is now a partially implemented three.js based 3MF Exporter available in my repository.

Here is an example of how it could be used, just try to focus on parts that matter:

      async function export_3mf() {
        if (gltf_obj) {
          // Use whatever path might be applicable for the location
          const { ThreeMFExporter } = await import( "../static/jsm/exporters/3MFExporter.js" );

          let tmf_exporter = new ThreeMFExporter( manager );

          let options = { upAxis: 'Y_UP', maxTextureSize: tex_res, map_flip_required: tex_flip };

          tmf_exporter.parse( gltf_obj.clone(), async function( arrayBuffer ) {
            let blob = new Blob( [ arrayBuffer ], { type: 'application/octet-stream' } );

            zip.file( filename + '.3mf', blob );

            let str = '_3MF';
            if (tex_flip === true) str += '_Y';
            if (tex_res !== Infinity) str += ' (' + tex_res + ')';
            await process_zip( str );
          }, function( error ) { handle_export_error( error ); }, options );
        }
      }

If any of you can make it any better then don’t hesitate to grab a copy of it and do it (and hopefully re-post it here or somewhere else).

It might eventually get some more updates and bug fixes from me.

UV issues I was having appear to be resolved but the exporter currently only supports the main material.map texture exporting.