提交 316f0782 编写于 作者: F Fernando Serrano

GLTFExporter: Fix empty children

上级 23e84369
......@@ -772,7 +772,7 @@ THREE.GLTFExporter.prototype = {
if ( object.children.length > 0 ) {
gltfNode.children = [];
var children = [];
for ( var i = 0, l = object.children.length; i < l; i ++ ) {
......@@ -783,12 +783,19 @@ THREE.GLTFExporter.prototype = {
child instanceof THREE.Line ||
child instanceof THREE.Points) {
gltfNode.children.push( processNode( child ) );
children.push( processNode( child ) );
}
}
if ( children.length > 0 ) {
gltfNode.children = children;
}
}
outputJSON.nodes.push( gltfNode );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册