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 = 20;
  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);
          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 dwr58 = p5.Vector.dist(pCfbr5, pCfbr8);
          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);
          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);
          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);
          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();

          fill(0);
          noStroke();
          strokeWeight(1);
          text(int(dwr417 / nCoef), pCfbr2.x, pCfbr2.y);
          text(int(dwr58 / nCoef), pCfbr5.x, pCfbr5.y);
          text(int(dwr129 / nCoef), pCfbr9.x, pCfbr9.y);
          text(int(dwr1613 / nCoef), pCfbr13.x, pCfbr13.y);
          text(int(dwr2017 / nCoef), pCfbr17.x, pCfbr17.y);
          break;
        case 1:
          strokeWeight(16);
          textSize(24);
          filler(126, ColorPulgarI);
          fillerStroke(126, ColorPulgarI);
          let dwl417 = p5.Vector.dist(pCfbl4, 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 dwl58 = p5.Vector.dist(pCfbl5, pCfbl8);
          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);
          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);
          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);
          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();

          fill(0);
          noStroke();
          strokeWeight(1);
          text(int(dwl417 / nCoef), pCfbl2.x, pCfbl2.y);
          text(int(dwl58 / nCoef), pCfbl5.x, pCfbl5.y);
          text(int(dwl129 / nCoef), pCfbl9.x, pCfbl9.y);
          text(int(dwl1613 / nCoef), pCfbl13.x, pCfbl13.y);
          text(int(dwl2017 / nCoef), pCfbl17.x, pCfbl17.y);
          break;
      }
    }
  }
  noFill();
  strokeWeight(1);
  noStroke();
  textSize(12);
}
/////////////////////////////////////////////
