function parse(value, defaultVec, target) {
  var coordinate;
  var defaultVal;
  var key;
  var i;
  var vec = target && typeof target === 'object' ? target : {};
  var x;
  var y;
  var z;
  var w;
  if (value && value instanceof Object) {
    x = value.x === undefined ? defaultVec && defaultVec.x : value.x;
    y = value.y === undefined ? defaultVec && defaultVec.y : value.y;
    z = value.z === undefined ? defaultVec && defaultVec.z : value.z;
    w = value.w === undefined ? defaultVec && defaultVec.w : value.w;
    if (x !== undefined && x !== null) {
      vec.x = parseIfString(x);
    }
    if (y !== undefined && y !== null) {
      vec.y = parseIfString(y);
    }
    if (z !== undefined && z !== null) {
      vec.z = parseIfString(z);
    }
    if (w !== undefined && w !== null) {
      vec.w = parseIfString(w);
    }
    return vec;
  }
  if (value === null || value === undefined) {
    return typeof defaultVec === 'object' ? Object.assign(vec, defaultVec) : defaultVec;
  }
  coordinate = value.trim().split(whitespaceRegex);
  for (i = 0; i < COORDINATE_KEYS.length; i++) {
    key = COORDINATE_KEYS[i];
    if (coordinate[i]) {
      vec[key] = parseFloat(coordinate[i], 10);
    } else {
      defaultVal = defaultVec && defaultVec[key];
      if (defaultVal === undefined) {
        continue;
      }
      vec[key] = parseIfString(defaultVal);
    }
  }
  return vec;
}
Parses coordinates from an "x y z" string.
Example: "3 10 -5" to {x: 3, y: 10, z: -5}.

@param {string} value - An "x y z" string.
@param {string} defaultVec - fallback value.
@param {object} target - Optional target object for coordinates.
@returns {object} An object with keys [x, y, z].