dist/claygl.es.js
function (node) {
        var originalParent = node._parent;
        if (originalParent === this) {
            return;
        }
        if (originalParent) {
            originalParent.remove(node);
        }
        node._parent = this;
        this._children.push(node);

        var scene = this._scene;
        if (scene && scene !== node.scene) {
            node.traverse(this._addSelfToScene, this);
        }
        // Mark children needs update transform
        // In case child are remove and added again after parent moved
        node._needsUpdateWorldTransform = true;
    }
function (node) {
        var originalParent = node._parent;
        if (originalParent === this) {
            return;
        }
        if (originalParent) {
            originalParent.remove(node);
        }
        node._parent = this;
        this._children.push(node);

        var scene = this._scene;
        if (scene && scene !== node.scene) {
            node.traverse(this._addSelfToScene, this);
        }
        // Mark children needs update transform
        // In case child are remove and added again after parent moved
        node._needsUpdateWorldTransform = true;
    }
function ( node ) { var originalParent = node . _parent ; if ( originalParent === this ) { return ; } if ( originalParent ) { originalParent . remove ( node ) ; } node . _parent = this ; this . _children . push ( node ) ; var scene = this . _scene ; if ( scene && scene !== node . scene ) { node . traverse ( this . _addSelfToScene , this ) ; } // Mark children needs update transform // In case child are remove and added again after parent moved node . _needsUpdateWorldTransform = true ; }
Add a child node
@param {clay.Node} node
Add a child node