dist/jcanvas.js
function _parseEndValues(canvas, layer, endValues) {
	var propName, propValue,
		subPropName, subPropValue;
	// Loop through all properties in map of end values
	for (propName in endValues) {
		if (Object.prototype.hasOwnProperty.call(endValues, propName)) {
			propValue = endValues[propName];
			// If end value is function
			if (isFunction(propValue)) {
				// Call function and use its value as the end value
				endValues[propName] = propValue.call(canvas, layer, propName);
			}
			// If end value is an object
			if (typeOf(propValue) === 'object' && isPlainObject(propValue)) {
				// Prepare to animate properties in object
				for (subPropName in propValue) {
					if (Object.prototype.hasOwnProperty.call(propValue, subPropName)) {
						subPropValue = propValue[subPropName];
						// Store property's start value at top-level of layer
						if (layer[propName] !== undefined) {
							layer[propName + '.' + subPropName] = layer[propName][subPropName];
							// Store property's end value at top-level of end values map
							endValues[propName + '.' + subPropName] = subPropValue;
						}
					}
				}
				// Delete sub-property of object as it's no longer needed
				delete endValues[propName];
			}
		}
	}
	return endValues;
}
function _parseEndValues(canvas, layer, endValues) {
	var propName, propValue,
		subPropName, subPropValue;
	// Loop through all properties in map of end values
	for (propName in endValues) {
		if (Object.prototype.hasOwnProperty.call(endValues, propName)) {
			propValue = endValues[propName];
			// If end value is function
			if (isFunction(propValue)) {
				// Call function and use its value as the end value
				endValues[propName] = propValue.call(canvas, layer, propName);
			}
			// If end value is an object
			if (typeOf(propValue) === 'object' && isPlainObject(propValue)) {
				// Prepare to animate properties in object
				for (subPropName in propValue) {
					if (Object.prototype.hasOwnProperty.call(propValue, subPropName)) {
						subPropValue = propValue[subPropName];
						// Store property's start value at top-level of layer
						if (layer[propName] !== undefined) {
							layer[propName + '.' + subPropName] = layer[propName][subPropName];
							// Store property's end value at top-level of end values map
							endValues[propName + '.' + subPropName] = subPropValue;
						}
					}
				}
				// Delete sub-property of object as it's no longer needed
				delete endValues[propName];
			}
		}
	}
	return endValues;
}
function _parseEndValues ( canvas , layer , endValues ) { var propName , propValue , subPropName , subPropValue ; // Loop through all properties in map of end values for ( propName in endValues ) { if ( Object . prototype . hasOwnProperty . call ( endValues , propName ) ) { propValue = endValues [ propName ] ; // If end value is function if ( isFunction ( propValue ) ) { // Call function and use its value as the end value endValues [ propName ] = propValue . call ( canvas , layer , propName ) ; } // If end value is an object if ( typeOf ( propValue ) === 'object' && isPlainObject ( propValue ) ) { // Prepare to animate properties in object for ( subPropName in propValue ) { if ( Object . prototype . hasOwnProperty . call ( propValue , subPropName ) ) { subPropValue = propValue [ subPropName ] ; // Store property's start value at top-level of layer if ( layer [ propName ] !== undefined ) { layer [ propName + '.' + subPropName ] = layer [ propName ] [ subPropName ] ; // Store property's end value at top-level of end values map endValues [ propName + '.' + subPropName ] = subPropValue ; } } } // Delete sub-property of object as it's no longer needed delete endValues [ propName ] ; } } } return endValues ; }
Evaluate property values that are functions
Evaluate property values that are functions