function getTransform(target, ancestor) {
  var mat = identity([]);

  while (target && target !== ancestor) {
    mul(mat, target.getLocalTransform(), mat);
    target = target.parent;
  }

  return mat;
}
Get transform matrix of target (param target),
in coordinate of its ancestor (param ancestor)

@param target
@param [ancestor]