function getAnimationValues (el, attribute, dataFrom, dataTo, currentValue) {
  var attributeSplit = attribute.split('.');
  var schema;
  var component;
  var componentPropName;
  var componentName;
  var from = {};
  var partialSetAttribute;
  var to = {};
  if (attributeSplit.length === 2) {
    if (isColor()) {
      getForColorComponent();
    } else {
      getForComponentAttribute();
    }
  } else if (dataTo && isCoordinates(dataTo)) {
    getForCoordinateComponent();
  } else if (['true', 'false'].indexOf(dataTo) !== -1) {
    getForBoolean();
  } else if (isNaN(dataTo)) {
    getForColorComponent();
  } else {
    getForNumber();
  }
  return {
    from: from,
    partialSetAttribute: partialSetAttribute,
    to: to
  };

  /**
   * Match the schema type to color
   * @return {bool} if the schema is of type color
   */
  function isColor () {
    var componentName = attributeSplit[0];
    var propertyName = attributeSplit[1];
    var component = el.components[componentName];
    var schema = component && component.schema;
    return schema && schema[propertyName] && schema[propertyName].type === 'color';
  }

  /**
   * Animating a component that has multiple attributes (e.g., geometry.width).
   */
  function getForComponentAttribute () {
    componentName = attributeSplit[0];
    componentPropName = attributeSplit[1];
    component = el.components[componentName];
    if (!component) {
      el.setAttribute(componentName, '');
      component = el.components[componentName];
    }
    schema = component.schema;
    if (dataFrom === undefined) {  // dataFrom can be 0.
      from[attribute] = getComponentProperty(el, attribute);
    } else {
      from[attribute] = dataFrom;
    }
    from[attribute] = parseProperty(from[attribute], schema[componentPropName]);
    to[attribute] = parseProperty(dataTo, schema[componentPropName]);
    partialSetAttribute = function (value) {
      if (!(attribute in value)) { return; }
      el.setAttribute(componentName, componentPropName, value[attribute]);
    };
  }

  /**
   * Animating a component that is an XYZ coordinate (e.g., position).
   * Will be tweening {x, y, z} all at once.
   */
  function getForCoordinateComponent () {
    from = dataFrom ? coordinates.parse(dataFrom) : currentValue;
    to = coordinates.parse(dataTo);
    partialSetAttribute = function (value) {
      el.setAttribute(attribute, value);
    };
  }

  /**
   * Animation a boolean (e.g., visible).
   * Have to convert from boolean to an integer (0 is false, > 0 is true) for tween.
   */
  function getForBoolean () {
    if (dataFrom === undefined) {
      from[attribute] = false;
    } else {
      from[attribute] = strToBool(dataFrom);
    }
    from[attribute] = boolToNum(from[attribute]);
    to[attribute] = boolToNum(strToBool(dataTo));
    partialSetAttribute = function (value) {
      el.setAttribute(attribute, !!value[attribute]);
    };
  }

  /**
   * Animating a color component
   *   Will convert a hex value to a THREE.Color
   *   Then converts to hex for the setAttribute
   */
  function getForColorComponent () {
    from = new THREE.Color(dataFrom || el.getAttribute(attribute));
    to = new THREE.Color(dataTo);
    partialSetAttribute = function (value) {
      if (attributeSplit.length > 1) {
        el.setAttribute(attributeSplit[0], attributeSplit[1], rgbVectorToHex(value));
      }
      el.setAttribute(attribute, rgbVectorToHex(value));
    };
  }

  /**
   * Animating a numbered attribute (e.g., opacity).
   */
  function getForNumber () {
    if (dataFrom === undefined) {  // dataFrom can be 0.
      from[attribute] = parseFloat(el.getAttribute(attribute));
    } else {
      from[attribute] = parseFloat(dataFrom);
    }
    to[attribute] = parseFloat(dataTo);
    partialSetAttribute = function (value) {
      el.setAttribute(attribute, value[attribute]);
    };
  }
}
Deduces different animation values based on whether we are:
  - animating an inner attribute of a component.
  - animating a coordinate component.
  - animating a boolean.
  - animating a number.

@param {Element} el
@param {string} attribute - Tells what to animate based on whether it is dot-separated.
@param {string} dataFrom - Data `from` value.
@param {string} dataTo - Data `to` value.
@param currentValue
@returns {object}
  Object with keys [from, to, partialSetAttribute].
    `from` and `to`
       Objects where key is attribute being animated and value is value.
    `partialSetAttribute`
       Closured-function that tells tween how to update the component.