Irving_87 2017-08-15 14:28 采纳率: 0%
浏览 2538

用three.js editor 中的import导入模型为黑色,求大神指点一下谢谢

我使用three.js editor file中的import功能导入fbx模型为黑色,不知道为什么....

  • 写回答

2条回答 默认 最新

  • Irving_87 2017-08-16 01:57
    关注

    // Import

    var fileInput = document.createElement( 'input' );
    fileInput.type = 'file';
    fileInput.addEventListener( 'change', function ( event ) {
    
        editor.loader.loadFile( fileInput.files[ 0 ] );
    
    } );
    
    var option = new UI.Row();
    option.setClass( 'option' );
    option.setTextContent( 'Import' );
    option.onClick( function () {
    
        fileInput.click();
    
    } );
    options.add( option );
    
    //
    
    options.add( new UI.HorizontalRule() );
    源代码是这样的
    
    评论

报告相同问题?