src/components/animation.js
function getPropertyType (el, property) {
  var component;
  var componentName;
  var split;
  var propertyName;

  split = property.split('.');
  componentName = split[0];
  propertyName = split[1];
  component = el.components[componentName] || components[componentName];

  // Primitives.
  if (!component) { return null; }

  // Dynamic schema. We only care about vectors anyways.
  if (propertyName && !component.schema[propertyName]) { return null; }

  // Multi-prop.
  if (propertyName) { return component.schema[propertyName].type; }

  // Single-prop.
  return component.schema.type;
}
function getPropertyType (el, property) {
  var component;
  var componentName;
  var split;
  var propertyName;

  split = property.split('.');
  componentName = split[0];
  propertyName = split[1];
  component = el.components[componentName] || components[componentName];

  // Primitives.
  if (!component) { return null; }

  // Dynamic schema. We only care about vectors anyways.
  if (propertyName && !component.schema[propertyName]) { return null; }

  // Multi-prop.
  if (propertyName) { return component.schema[propertyName].type; }

  // Single-prop.
  return component.schema.type;
}
function getPropertyType ( el , property ) { var component ; var componentName ; var split ; var propertyName ; split = property . split ( '.' ) ; componentName = split [ 0 ] ; propertyName = split [ 1 ] ; component = el . components [ componentName ] || components [ componentName ] ; // Primitives. if ( ! component ) { return null ; } // Dynamic schema. We only care about vectors anyways. if ( propertyName && ! component . schema [ propertyName ] ) { return null ; } // Multi-prop. if ( propertyName ) { return component . schema [ propertyName ] . type ; } // Single-prop. return component . schema . type ; }
Given property name, check schema to see what type we are animating.
We just care whether the property is a vector.
Given property name check schema to see what type we are animating . We just care whether the property is a vector .