提交 4ded58a4 编写于 作者: M Mr.doob

Editor: Fixed GLTF file loading. See #9866

上级 34b20374
......@@ -163,11 +163,12 @@ var Loader = function ( editor ) {
var json = JSON.parse( contents );
var loader = new THREE.GLTFLoader();
var collada = loader.parse( json );
loader.parse( json, function ( result ) {
collada.scene.name = filename;
result.scene.name = filename;
editor.execute( new AddObjectCommand( result.scene ) );
editor.execute( new AddObjectCommand( collada.scene ) );
} );
}, false );
reader.readAsText( file );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册