提交 22a7f464 编写于 作者: M Mr.doob

This should avoid people adding stuff that it's not an Object3D to the Scene Graph.

Also, checking if the object is already a children is a bit redudant (the next lines code takes care of that indirectly).
上级 7f4c64a1
......@@ -114,7 +114,7 @@ THREE.Object3D.prototype = {
}
if ( this.children.indexOf( object ) === - 1 ) {
if ( object instanceof THREE.Object3D ) { // && this.children.indexOf( object ) === - 1
if ( object.parent !== undefined ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册