scripts/modelAnimation.js
/**
 * Calculate the field of view (range) that should be displayed based on the current speed
 * @param {KmlLookAt} currentLookAt The current camera's view
 * @return {number} The range the camera should be set to
 */
Calculate the field of view (range) that should be displayed based on the current speed
@param {KmlLookAt} currentLookAt The current camera's view
@return {number} The range the camera should be set to
Calculate the field of view ( range ) that should be displayed based on the current speed @param { KmlLookAt } currentLookAt The current camera ' s view @return { number } The range the camera should be set to
function calculateRequiredRange(currentLookAt) {
	var minimumDesiredRange = 20;
	var currentRange = currentLookAt.getRange();
	var desiredRange = Math.max(minimumDesiredRange, this.currentSpeed * 10);
	var requiredRange = currentRange + (desiredRange - currentRange) * 0.1;
	return requiredRange;
}
function calculateRequiredRange ( currentLookAt ) { var minimumDesiredRange = 20 ; var currentRange = currentLookAt . getRange ( ) ; var desiredRange = Math . max ( minimumDesiredRange , this . currentSpeed * 10 ) ; var requiredRange = currentRange + ( desiredRange - currentRange ) * 0.1 ; return requiredRange ; }
Calculate the field of view (range) that should be displayed based on the current speed
 @param {KmlLookAt} currentLookAt The current camera's view
 @return {number} The range the camera should be set to
Calculate the field of view ( range ) that should be displayed based on the current speed @param { KmlLookAt } currentLookAt The current camera ' s view @return { number } The range the camera should be set to