initVariables();
//////////////////////////////////
function funcionGo(ctx, width, height) {
  if (lInit) {
    jsreinitProcedure();
    lDelayLocal = true;
    jsinitTimer(1);
    txClocalUp = "Abrir y cerrar la mano";
    txClocalDown = "";
    nSwitchTmp = -1;
  }
  //displaymodulo(0);
  if (nSwitchTmp < nSwitch) oneToOneFingers();
  punterosHandOneFingersBox()
}
////////////////////////////////////////////
function punterosHandOneFingersBox() {
  let nCoef = 45;
  for (let i = 0; i < combinedLandmarks.length; i++) {
    if (lDisplayFingers) {
      switch (i) {
        case 0:
          strokeWeight(16);
          textSize(24);
          filler(126, ColorPulgarI);
          fillerStroke(126, ColorPulgarI);
          let dwr417 = p5.Vector.dist(pCfbr4, pCfbr17);
          let dwr317 = p5.Vector.dist(pCfbr3, pCfbr17);
          beginShape();
          curveVertex(pCfbr2.x, pCfbr2.y);
          curveVertex(pCfbr3.x, pCfbr3.y);
          curveVertex(pCfbr4.x, pCfbr4.y);
          curveVertex(pCfbr5.x, pCfbr5.y);
          endShape();

          filler(126, ColorIndiceI);
          fillerStroke(126, ColorIndiceI);
          let dwr85 = p5.Vector.dist(pCfbr8, pCfbr5);
          let dwr70 = p5.Vector.dist(pCfbr7, pCfbr0);
          let dwr80 = p5.Vector.dist(pCfbr8, pCfbr0);
          beginShape();
          curveVertex(pCfbr8.x, pCfbr8.y);
          curveVertex(pCfbr8.x, pCfbr8.y);
          curveVertex(pCfbr7.x, pCfbr7.y);
          curveVertex(pCfbr6.x, pCfbr6.y);
          curveVertex(pCfbr5.x, pCfbr5.y);
          curveVertex(pCfbr5.x, pCfbr5.y);
          endShape();

          filler(126, ColorMedioI);
          fillerStroke(126, ColorMedioI);
          let dwr129 = p5.Vector.dist(pCfbr12, pCfbr9);
          let dwr110 = p5.Vector.dist(pCfbr11, pCfbr0);
          let dwr120 = p5.Vector.dist(pCfbr12, pCfbr0);
          beginShape();
          curveVertex(pCfbr12.x, pCfbr12.y);
          curveVertex(pCfbr12.x, pCfbr12.y);
          curveVertex(pCfbr11.x, pCfbr11.y);
          curveVertex(pCfbr10.x, pCfbr10.y);
          curveVertex(pCfbr9.x, pCfbr9.y);
          curveVertex(pCfbr9.x, pCfbr9.y);
          endShape();

          filler(126, ColorAnularI);
          fillerStroke(126, ColorAnularI)
          let dwr1613 = p5.Vector.dist(pCfbr16, pCfbr13);
          let dwr150 = p5.Vector.dist(pCfbr15, pCfbr0);
          let dwr160 = p5.Vector.dist(pCfbr16, pCfbr0);
          beginShape();
          curveVertex(pCfbr16.x, pCfbr16.y);
          curveVertex(pCfbr16.x, pCfbr16.y);
          curveVertex(pCfbr15.x, pCfbr15.y);
          curveVertex(pCfbr14.x, pCfbr14.y);
          curveVertex(pCfbr13.x, pCfbr13.y);
          curveVertex(pCfbr13.x, pCfbr13.y);
          endShape();

          filler(126, ColorMenorI);
          fillerStroke(126, ColorMenorI);
          let dwr2017 = p5.Vector.dist(pCfbr20, pCfbr17);
          let dwr190 = p5.Vector.dist(pCfbr19, pCfbr0);
          let dwr200 = p5.Vector.dist(pCfbr20, pCfbr0);
          beginShape();
          curveVertex(pCfbr20.x, pCfbr20.y);
          curveVertex(pCfbr20.x, pCfbr20.y);
          curveVertex(pCfbr19.x, pCfbr19.y);
          curveVertex(pCfbr18.x, pCfbr18.y);
          curveVertex(pCfbr17.x, pCfbr17.y);
          curveVertex(pCfbr17.x, pCfbr17.y);
          endShape();

          ellipse(pCfbr0.x, pCfbr0.y, 25)

          fill(0);
          noStroke();
          strokeWeight(1);
          text(int(dwr417 / nCoef * 1.7), pCfbr2.x, pCfbr2.y);
          text(int(dwr70 / nCoef + 0.5), pCfbr5.x, pCfbr5.y);
          text(int(dwr110 / nCoef), pCfbr9.x, pCfbr9.y);
          text(int(dwr150 / nCoef + 0.5), pCfbr13.x, pCfbr13.y);
          text(int(dwr200 / nCoef + 1), pCfbr17.x, pCfbr17.y);

          /*text(int(dwr417 /nCoef * 1.7), pCfbr2.x, pCfbr2.y);
          text(int(dwr80 /nCoef+0.5), pCfbr5.x, pCfbr5.y);
          text(int(dwr120 /nCoef), pCfbr9.x, pCfbr9.y);
          text(int(dwr160 /nCoef+0.5), pCfbr13.x, pCfbr13.y);
          text(int(dwr200 /nCoef+1), pCfbr17.x, pCfbr17.y);*/

          break;
        case 1:
          strokeWeight(16);
          textSize(24);
          filler(126, ColorPulgarI);
          fillerStroke(126, ColorPulgarI);
          let dwl417 = p5.Vector.dist(pCfbl4, pCfbl17);
          let dwl317 = p5.Vector.dist(pCfbl3, pCfbl17);
          beginShape();
          curveVertex(pCfbl2.x, pCfbl2.y);
          curveVertex(pCfbl3.x, pCfbl3.y);
          curveVertex(pCfbl4.x, pCfbl4.y);
          curveVertex(pCfbl5.x, pCfbl5.y);
          endShape();

          filler(126, ColorIndiceI);
          fillerStroke(126, ColorIndiceI);
          let dwl85 = p5.Vector.dist(pCfbl8, pCfbl5);
          let dwl70 = p5.Vector.dist(pCfbl7, pCfbl0);
          let dwl80 = p5.Vector.dist(pCfbl8, pCfbl0);
          beginShape();
          curveVertex(pCfbl8.x, pCfbl8.y);
          curveVertex(pCfbl8.x, pCfbl8.y);
          curveVertex(pCfbl7.x, pCfbl7.y);
          curveVertex(pCfbl6.x, pCfbl6.y);
          curveVertex(pCfbl5.x, pCfbl5.y);
          curveVertex(pCfbl5.x, pCfbl5.y);
          endShape();

          filler(126, ColorMedioI);
          fillerStroke(126, ColorMedioI);
          let dwl129 = p5.Vector.dist(pCfbl12, pCfbl9);
          let dwl110 = p5.Vector.dist(pCfbl11, pCfbl0);
          let dwl120 = p5.Vector.dist(pCfbl12, pCfbl0);
          beginShape();
          curveVertex(pCfbl12.x, pCfbl12.y);
          curveVertex(pCfbl12.x, pCfbl12.y);
          curveVertex(pCfbl11.x, pCfbl11.y);
          curveVertex(pCfbl10.x, pCfbl10.y);
          curveVertex(pCfbl9.x, pCfbl9.y);
          curveVertex(pCfbl9.x, pCfbl9.y);
          endShape();

          filler(126, ColorAnularI);
          fillerStroke(126, ColorAnularI)
          let dwl1613 = p5.Vector.dist(pCfbl16, pCfbl13);
          let dwl150 = p5.Vector.dist(pCfbl15, pCfbl0);
          let dwl160 = p5.Vector.dist(pCfbl16, pCfbl0);
          beginShape();
          curveVertex(pCfbl16.x, pCfbl16.y);
          curveVertex(pCfbl16.x, pCfbl16.y);
          curveVertex(pCfbl15.x, pCfbl15.y);
          curveVertex(pCfbl14.x, pCfbl14.y);
          curveVertex(pCfbl13.x, pCfbl13.y);
          curveVertex(pCfbl13.x, pCfbl13.y);
          endShape();

          filler(126, ColorMenorI);
          fillerStroke(126, ColorMenorI);
          let dwl2017 = p5.Vector.dist(pCfbl20, pCfbl17);
          let dwl190 = p5.Vector.dist(pCfbl19, pCfbl0);
          let dwl200 = p5.Vector.dist(pCfbl20, pCfbl0);
          beginShape();
          curveVertex(pCfbl20.x, pCfbl20.y);
          curveVertex(pCfbl20.x, pCfbl20.y);
          curveVertex(pCfbl19.x, pCfbl19.y);
          curveVertex(pCfbl18.x, pCfbl18.y);
          curveVertex(pCfbl17.x, pCfbl17.y);
          curveVertex(pCfbl17.x, pCfbl17.y);
          endShape();

          ellipse(pCfbl0.x, pCfbl0.y, 25)

          fill(0);
          noStroke();
          strokeWeight(1);
          text(int(dwl417 / nCoef * 1.7), pCfbl2.x, pCfbl2.y);
          text(int(dwl70 / nCoef + 0.5), pCfbl5.x, pCfbl5.y);
          text(int(dwl110 / nCoef), pCfbl9.x, pCfbl9.y);
          text(int(dwl150 / nCoef + 0.5), pCfbl13.x, pCfbl13.y);
          text(int(dwl200 / nCoef + 1), pCfbl17.x, pCfbl17.y);

          /*text(int(dwl417 /nCoef * 1.7), pCfbl2.x, pCfbl2.y);
          text(int(dwl80 /nCoef+0.5), pCfbl5.x, pCfbl5.y);
          text(int(dwl120 /nCoef), pCfbl9.x, pCfbl9.y);
          text(int(dwl160 /nCoef+0.5), pCfbl13.x, pCfbl13.y);
          text(int(dwl200 /nCoef+1), pCfbl17.x, pCfbl17.y);*/
          break;
      }
    }
  }
  noFill();
  strokeWeight(1);
  noStroke();
  textSize(12);
}
/////////////////////////////////////////////
