提交 c97101fe 编写于 作者: F Fernando Serrano

Added callback

上级 cea04d51
......@@ -190,7 +190,9 @@
var gltfExporter = new THREE.GLTFExporter();
// gltfExporter.parse(scene);
//console.log(JSON.stringify(gltfExporter.parse(scene), null, 2));
saveString( JSON.stringify(gltfExporter.parse(scene),null, 2), 'scene.gltf' );
gltfExporter.parse(scene, function(result){
saveString( JSON.stringify(result,null, 2), 'scene.gltf' );
});
//
......
......@@ -608,7 +608,7 @@ THREE.GLTFExporter = function () {};
THREE.GLTFExporter.prototype = {
constructor: THREE.GLTFExporter,
parse: function ( input ) {
parse: function ( input, onDone ) {
var outputJSON = {
/*
......@@ -939,10 +939,7 @@ THREE.GLTFExporter.prototype = {
base64data = reader.result;
outputJSON.buffers[0].uri = base64data;
console.log(JSON.stringify(outputJSON, null, 2));
onDone(outputJSON);
}
return outputJSON;
}
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册