function replace(node, index) {
    if (index == -1) {
        return node;
    }
    var { scope } = node;
    var { parent } = node;
    parent.nodeList.clean(node);
    node.delete();
    node = scope.allNodes[index];
    node.parent = parent;
    parent.nodeList.push(node);
    node.updateRotation();
    node.scope.timeStamp = new Date().getTime();
    return node;
}
Fn to replace node by node @ index in global Node List - used when loading
@param {Node} node - node to be replaced
@param {number} index - index of node to be replaced
@category node