提交 837229a6 编写于 作者: M Mr.doob

Editor: Added File / Export DAE

上级 58172b34
......@@ -46,8 +46,10 @@
<script src="../examples/js/loaders/ctm/lzma.js"></script>
<script src="../examples/js/loaders/ctm/ctm.js"></script>
<script src="../examples/js/loaders/ctm/CTMLoader.js"></script>
<script src="../examples/js/exporters/OBJExporter.js"></script>
<script src="../examples/js/exporters/ColladaExporter.js"></script>
<script src="../examples/js/exporters/GLTFExporter.js"></script>
<script src="../examples/js/exporters/OBJExporter.js"></script>
<script src="../examples/js/exporters/STLExporter.js"></script>
<script src="../examples/js/renderers/Projector.js"></script>
......
......@@ -184,6 +184,24 @@ Menubar.File = function ( editor ) {
options.add( new UI.HorizontalRule() );
// Export DAE
var option = new UI.Row();
option.setClass( 'option' );
option.setTextContent( 'Export DAE' );
option.onClick( function () {
var exporter = new THREE.ColladaExporter();
exporter.parse( editor.scene, function ( result ) {
saveString( result.data, 'scene.dae' );
} );
} );
options.add( option );
// Export GLB
var option = new UI.Row();
......@@ -200,7 +218,7 @@ Menubar.File = function ( editor ) {
// forceIndices: true, forcePowerOfTwoTextures: true
// to allow compatibility with facebook
}, { binary: true, forceIndices: true, forcePowerOfTwoTextures: true } );
} );
options.add( option );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册