dist/bundle.js
/**
     * makeRadialArch sets the region's paths to a rainbow-shaped arch from the bounds and a bend strength
     * @param {Number} radialBend must be >= 0
     */
makeRadialArch sets the region's paths to a rainbow-shaped arch from the bounds and a bend strength
@param {Number} radialBend must be >= 0
makeRadialArch sets the region ' s paths to a rainbow - shaped arch from the bounds and a bend strength @param { Number } radialBend must be > = 0
function makeRadialArch(radialBend) {
      if (radialBend === 0) {
        return makeStraightPaths();
      }
      let lowerArch = radialBend < 0;
      radialBend = Math.abs(radialBend);
      let toparc = createSVGElement$1('path');
      let bottomarc = createSVGElement$1('path');
      let bottomarcstr = '';
      let toparcstr = '';
      let arcBend = -(1 - radialBend) * Math.PI / 4;
      let arc = {
        r: 0, 
        theta: null,
        rc: 0,
        rg: region.bounds.width,
        px: (region.bounds.x + region.bounds.width / 2),
        py: (region.bounds.y + region.bounds.height),
        s: 0
      };
      calcArc(arcBend);
      drawArcs(lowerArch);
      region.topPath = toparc;
      region.bottomPath = bottomarc;
      function calcArc(newR) {
        arc.r = newR;
        arc.theta = Math.PI - 2 * newR;
        arc.rc = Math.sin(arc.r) / (arc.rg * Math.sin(arc.theta) + epsilon);
        arc.s = Math.tan(arc.theta) * arc.rg / 2;
      }
      function drawArcs(reverse = false) {
        let smallAx, smallAy, smallBx, smallBy, smallRadius,
          bigAx, bigAy, bigBx, bigBy, bigRadius;
        let sweepFlag = reverse ? 0 : 1;
        if (reverse) {
          bigAx = region.bounds.x;
          bigAy = region.bounds.y;
          bigBx = (region.bounds.x + region.bounds.width);
          bigBy = bigAy;
          bigRadius = Math.sqrt(Math.pow(arc.s,2) + Math.pow(region.bounds.width / 2,2));
          smallAx = region.bounds.x + region.bounds.height * Math.cos(arc.theta);
          smallAy = region.bounds.y - region.bounds.height * Math.sin(arc.theta);
          smallBx = region.bounds.x + region.bounds.width - region.bounds.height * Math.cos(arc.theta);
          smallBy = region.bounds.y - region.bounds.height * Math.sin(arc.theta);
          smallRadius = bigRadius + region.bounds.height;
        }
        else {
          smallAx = region.bounds.x;
          smallAy = (region.bounds.y + region.bounds.height);
          smallBx = (region.bounds.x + region.bounds.width);
          smallBy = smallAy;
          smallRadius = Math.sqrt(Math.pow(arc.s,2) + Math.pow(region.bounds.width / 2,2));
          bigAx = region.bounds.x + region.bounds.height * Math.cos(arc.theta);
          bigAy = region.bounds.y + region.bounds.height + region.bounds.height * Math.sin(arc.theta);
          bigBx = region.bounds.x + region.bounds.width - region.bounds.height * Math.cos(arc.theta);
          bigBy = region.bounds.y + region.bounds.height + region.bounds.height * Math.sin(arc.theta);
          bigRadius = smallRadius + region.bounds.height;
        }
        bottomarcstr = 'M' + smallAx + ' ' + smallAy;
        bottomarcstr += ' A' + smallRadius + ' ' + smallRadius + ' 0 0 ' + sweepFlag + ' ';
        bottomarcstr += smallBx + ' ' + smallBy;
        bottomarc.setAttribute('d', bottomarcstr);
        toparcstr = 'M' + (bigAx) + ' ' + (bigAy);
        toparcstr += ' A' + bigRadius + ' ' + bigRadius + ' 0 0 ' + sweepFlag + ' ';
        toparcstr += bigBx + ' ' + bigBy;
        toparc.setAttribute('d', toparcstr);
      }
    }
function makeRadialArch ( radialBend ) { if ( radialBend === 0 ) { return makeStraightPaths ( ) ; } let lowerArch = radialBend < 0 ; radialBend = Math . abs ( radialBend ) ; let toparc = createSVGElement$1 ( 'path' ) ; let bottomarc = createSVGElement$1 ( 'path' ) ; let bottomarcstr = '' ; let toparcstr = '' ; let arcBend = - ( 1 - radialBend ) * Math . PI / 4 ; let arc = { r : 0 , theta : null , rc : 0 , rg : region . bounds . width , px : ( region . bounds . x + region . bounds . width / 2 ) , py : ( region . bounds . y + region . bounds . height ) , s : 0 } ; calcArc ( arcBend ) ; drawArcs ( lowerArch ) ; region . topPath = toparc ; region . bottomPath = bottomarc ; function calcArc ( newR ) { arc . r = newR ; arc . theta = Math . PI - 2 * newR ; arc . rc = Math . sin ( arc . r ) / ( arc . rg * Math . sin ( arc . theta ) + epsilon ) ; arc . s = Math . tan ( arc . theta ) * arc . rg / 2 ; } function drawArcs ( reverse = false ) { let smallAx , smallAy , smallBx , smallBy , smallRadius , bigAx , bigAy , bigBx , bigBy , bigRadius ; let sweepFlag = reverse ? 0 : 1 ; if ( reverse ) { bigAx = region . bounds . x ; bigAy = region . bounds . y ; bigBx = ( region . bounds . x + region . bounds . width ) ; bigBy = bigAy ; bigRadius = Math . sqrt ( Math . pow ( arc . s , 2 ) + Math . pow ( region . bounds . width / 2 , 2 ) ) ; smallAx = region . bounds . x + region . bounds . height * Math . cos ( arc . theta ) ; smallAy = region . bounds . y - region . bounds . height * Math . sin ( arc . theta ) ; smallBx = region . bounds . x + region . bounds . width - region . bounds . height * Math . cos ( arc . theta ) ; smallBy = region . bounds . y - region . bounds . height * Math . sin ( arc . theta ) ; smallRadius = bigRadius + region . bounds . height ; } else { smallAx = region . bounds . x ; smallAy = ( region . bounds . y + region . bounds . height ) ; smallBx = ( region . bounds . x + region . bounds . width ) ; smallBy = smallAy ; smallRadius = Math . sqrt ( Math . pow ( arc . s , 2 ) + Math . pow ( region . bounds . width / 2 , 2 ) ) ; bigAx = region . bounds . x + region . bounds . height * Math . cos ( arc . theta ) ; bigAy = region . bounds . y + region . bounds . height + region . bounds . height * Math . sin ( arc . theta ) ; bigBx = region . bounds . x + region . bounds . width - region . bounds . height * Math . cos ( arc . theta ) ; bigBy = region . bounds . y + region . bounds . height + region . bounds . height * Math . sin ( arc . theta ) ; bigRadius = smallRadius + region . bounds . height ; } bottomarcstr = 'M' + smallAx + ' ' + smallAy ; bottomarcstr += ' A' + smallRadius + ' ' + smallRadius + ' 0 0 ' + sweepFlag + ' ' ; bottomarcstr += smallBx + ' ' + smallBy ; bottomarc . setAttribute ( 'd' , bottomarcstr ) ; toparcstr = 'M' + ( bigAx ) + ' ' + ( bigAy ) ; toparcstr += ' A' + bigRadius + ' ' + bigRadius + ' 0 0 ' + sweepFlag + ' ' ; toparcstr += bigBx + ' ' + bigBy ; toparc . setAttribute ( 'd' , toparcstr ) ; } }
makeRadialArch sets the region's paths to a rainbow-shaped arch from the bounds and a bend strength
 @param {Number} radialBend must be >= 0
makeRadialArch sets the region ' s paths to a rainbow - shaped arch from the bounds and a bend strength @param { Number } radialBend must be > = 0
//radians