src/lib/entity.js
function getImplicitValue(component, source) {
  var isInherited = false;
  var value = (isSingleProperty(component.schema) ? _single : _multi)();
  return [value, isInherited];

  function _single() {
    var value = getMixedValue(component, null, source);
    if (value === undefined) {
      value = getInjectedValue(component, null, source);
    }
    if (value !== undefined) {
      isInherited = true;
    } else {
      value = getDefaultValue(component, null, source);
    }
    if (value !== undefined) {
      // XXX: This assumes parse is idempotent
      return component.schema.parse(value);
    }
    return value;
  }

  function _multi() {
    var value;

    Object.keys(component.schema).forEach(function(propertyName) {
      var propertyValue = getFromAttribute(component, propertyName, source);
      if (propertyValue === undefined) {
        propertyValue = getMixedValue(component, propertyName, source);
      }
      if (propertyValue === undefined) {
        propertyValue = getInjectedValue(component, propertyName, source);
      }
      if (propertyValue !== undefined) {
        isInherited = isInherited || true;
      } else {
        propertyValue = getDefaultValue(component, propertyName, source);
      }
      if (propertyValue !== undefined) {
        var parse = component.schema[propertyName].parse;
        value = value || {};
        // XXX: This assumes parse is idempotent
        value[propertyName] = parse(propertyValue);
      }
    });

    return value;
  }
}
function getImplicitValue(component, source) {
  var isInherited = false;
  var value = (isSingleProperty(component.schema) ? _single : _multi)();
  return [value, isInherited];

  function _single() {
    var value = getMixedValue(component, null, source);
    if (value === undefined) {
      value = getInjectedValue(component, null, source);
    }
    if (value !== undefined) {
      isInherited = true;
    } else {
      value = getDefaultValue(component, null, source);
    }
    if (value !== undefined) {
      // XXX: This assumes parse is idempotent
      return component.schema.parse(value);
    }
    return value;
  }

  function _multi() {
    var value;

    Object.keys(component.schema).forEach(function(propertyName) {
      var propertyValue = getFromAttribute(component, propertyName, source);
      if (propertyValue === undefined) {
        propertyValue = getMixedValue(component, propertyName, source);
      }
      if (propertyValue === undefined) {
        propertyValue = getInjectedValue(component, propertyName, source);
      }
      if (propertyValue !== undefined) {
        isInherited = isInherited || true;
      } else {
        propertyValue = getDefaultValue(component, propertyName, source);
      }
      if (propertyValue !== undefined) {
        var parse = component.schema[propertyName].parse;
        value = value || {};
        // XXX: This assumes parse is idempotent
        value[propertyName] = parse(propertyValue);
      }
    });

    return value;
  }
}
function getImplicitValue ( component , source ) { var isInherited = false ; var value = ( isSingleProperty ( component . schema ) ? _single : _multi ) ( ) ; return [ value , isInherited ] ; function _single ( ) { var value = getMixedValue ( component , null , source ) ; if ( value === undefined ) { value = getInjectedValue ( component , null , source ) ; } if ( value !== undefined ) { isInherited = true ; } else { value = getDefaultValue ( component , null , source ) ; } if ( value !== undefined ) { // XXX: This assumes parse is idempotent return component . schema . parse ( value ) ; } return value ; } function _multi ( ) { var value ; Object . keys ( component . schema ) . forEach ( function ( propertyName ) { var propertyValue = getFromAttribute ( component , propertyName , source ) ; if ( propertyValue === undefined ) { propertyValue = getMixedValue ( component , propertyName , source ) ; } if ( propertyValue === undefined ) { propertyValue = getInjectedValue ( component , propertyName , source ) ; } if ( propertyValue !== undefined ) { isInherited = isInherited || true ; } else { propertyValue = getDefaultValue ( component , propertyName , source ) ; } if ( propertyValue !== undefined ) { var parse = component . schema [ propertyName ] . parse ; value = value || { } ; // XXX: This assumes parse is idempotent value [ propertyName ] = parse ( propertyValue ) ; } } ) ; return value ; } }
Computes the value for a component coming from primitive attributes,
mixins, primitive defaults, a-frame default components and schema defaults.
In this specific order.

In other words, it is the value of the component if the author would have not
overridden it explicitly.

@param {Component} component Component to calculate the value of.
@param {Element}   source    Element owning the component.
@return                      A pair with the computed value for the component of source and a flag indicating if the component is completely inherited from other sources (`true`) or genuinely owned by the source entity (`false`).
Computes the value for a component coming from primitive attributes mixins primitive defaults a - frame default components and schema defaults . In this specific order .