dist/axis3d.js
/**
 * Returns a normalized scale vector with optional defaults applied.
 * normalizeScaleVector(scale: Array|Number,
 *                      [defaultScale: Array|Number]) -> Array
 */
Returns a normalized scale vector with optional defaults applied.
Returns a normalized scale vector with optional defaults applied .
function normalizeScaleVector(scale) {
  var defaultScale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [1, 1, 1];
  if ('number' == typeof defaultScale) {
    defaultScale = normalizeScaleVector(defaultScale, [1, 1, 1]);
  }
  if ('number' == typeof scale) {
    return fill(3, scale);
  } else if (Array.isArray(scale)) {
    return Object.assign(scale, defaultScale).slice(0, 3);
  } else {
    return defaultScale;
  }
}
function normalizeScaleVector ( scale ) { var defaultScale = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : [ 1 , 1 , 1 ] ; if ( 'number' == typeof defaultScale ) { defaultScale = normalizeScaleVector ( defaultScale , [ 1 , 1 , 1 ] ) ; } if ( 'number' == typeof scale ) { return fill ( 3 , scale ) ; } else if ( Array . isArray ( scale ) ) { return Object . assign ( scale , defaultScale ) . slice ( 0 , 3 ) ; } else { return defaultScale ; } }
Returns a normalized scale vector with optional defaults applied.
Returns a normalized scale vector with optional defaults applied .